Commit e766105a authored by Guido Gunther's avatar Guido Gunther

shell: Decruft primary monitor getter

We update it on configuration changes so no need to fetch
the first one.
Signed-off-by: Guido Gunther's avatarGuido Günther <guido.gunther@puri.sm>
parent 49419fca
......@@ -826,19 +826,12 @@ PhoshMonitor *
phosh_shell_get_primary_monitor (PhoshShell *self)
{
PhoshShellPrivate *priv;
PhoshMonitor *monitor;
g_return_val_if_fail (PHOSH_IS_SHELL (self), NULL);
priv = phosh_shell_get_instance_private (self);
g_return_val_if_fail (PHOSH_IS_MONITOR (priv->primary_monitor), NULL);
if (priv->primary_monitor)
return priv->primary_monitor;
/* When the shell started up we might not have had all monitors */
monitor = phosh_monitor_manager_get_monitor (priv->monitor_manager, 0);
g_return_val_if_fail (monitor, NULL);
return monitor;
return priv->primary_monitor;
}
......
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