1
0
Fork 0

display: Clean up screen management code

This commit is contained in:
Jasper St. Pierre 2014-02-07 19:52:34 -05:00
parent def5e86673
commit 6561b53346

View file

@ -808,12 +808,7 @@ meta_display_open (void)
screen = meta_screen_new (the_display, i, timestamp);
if (screen)
screens = g_slist_prepend (screens, screen);
the_display->screens = screens;
if (screens == NULL)
if (!screen)
{
/* This would typically happen because all the screens already
* have window managers.
@ -822,13 +817,11 @@ meta_display_open (void)
return FALSE;
}
enable_compositor (the_display);
screens = g_slist_prepend (screens, screen);
/* Now manage all existing windows */
tmp = the_display->screens;
while (tmp != NULL)
{
MetaScreen *screen = tmp->data;
the_display->screens = screens;
enable_compositor (the_display);
meta_screen_create_guard_window (screen);
@ -838,9 +831,6 @@ meta_display_open (void)
if (!meta_is_wayland_compositor ())
meta_screen_manage_all_windows (screen);
tmp = tmp->next;
}
{
Window focus;
int ret_to;