[mutter/wayland] display: Clean up screen management code



commit 6561b53346b0828823638527002fc34936691be4
Author: Jasper St. Pierre <jstpierre mecheye net>
Date:   Fri Feb 7 19:52:34 2014 -0500

    display: Clean up screen management code

 src/core/display.c |   32 +++++++++++---------------------
 1 files changed, 11 insertions(+), 21 deletions(-)
---
diff --git a/src/core/display.c b/src/core/display.c
index 37aab06..e5dd43f 100644
--- a/src/core/display.c
+++ b/src/core/display.c
@@ -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,24 +817,19 @@ meta_display_open (void)
       return FALSE;
     }
 
-  enable_compositor (the_display);
-   
-  /* Now manage all existing windows */
-  tmp = the_display->screens;
-  while (tmp != NULL)
-    {
-      MetaScreen *screen = tmp->data;
+  screens = g_slist_prepend (screens, screen);
 
-      meta_screen_create_guard_window (screen);
+  the_display->screens = screens;
 
-      /* We know that if mutter is running as a Wayland compositor,
-       * we start out with no windows.
-       */
-      if (!meta_is_wayland_compositor ())
-        meta_screen_manage_all_windows (screen);
+  enable_compositor (the_display);
 
-      tmp = tmp->next;
-    }
+  meta_screen_create_guard_window (screen);
+
+  /* We know that if mutter is running as a Wayland compositor,
+   * we start out with no windows.
+   */
+  if (!meta_is_wayland_compositor ())
+    meta_screen_manage_all_windows (screen);
 
   {
     Window focus;


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]