Commit 80c37a72 authored by Guido Gunther's avatar Guido Gunther

shell: Abort if we don't find any monitors

We can't go on without one.
Signed-off-by: Guido Gunther's avatarGuido Günther <guido.gunther@puri.sm>
parent e766105a
......@@ -637,20 +637,19 @@ phosh_shell_constructed (GObject *object)
/* Make sure all outputs are up to date */
phosh_wayland_roundtrip (phosh_wayland_get_default ());
if (phosh_monitor_manager_get_num_monitors(priv->monitor_manager)) {
priv->builtin_monitor = g_object_ref (find_builtin_monitor (self));
g_debug ("Builtin monitor is %s, %d", priv->builtin_monitor->name,
phosh_monitor_is_configured (priv->builtin_monitor));
/* Can't invoke phosh_shell_set_primary_monitor () since the shell
object does not really exist yet but we need the primary monitor
early for the panels */
priv->primary_monitor = g_object_ref (priv->builtin_monitor);
g_signal_connect_swapped (priv->primary_monitor,
"configured",
G_CALLBACK (on_primary_monitor_configured),
self);
}
priv->builtin_monitor = g_object_ref (find_builtin_monitor (self));
g_debug ("Builtin monitor is %s, %d", priv->builtin_monitor->name,
phosh_monitor_is_configured (priv->builtin_monitor));
/* Can't invoke phosh_shell_set_primary_monitor () since the shell
object does not really exist yet but we need the primary monitor
early for the panels */
priv->primary_monitor = g_object_ref (priv->builtin_monitor);
g_signal_connect_swapped (priv->primary_monitor,
"configured",
G_CALLBACK (on_primary_monitor_configured),
self);
g_assert (PHOSH_IS_MONITOR (priv->primary_monitor));
g_assert (PHOSH_IS_MONITOR (priv->builtin_monitor));
gtk_icon_theme_add_resource_path (gtk_icon_theme_get_default (),
"/sm/puri/phosh/icons");
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment