[mutter/wip/focus: 1/5] display: Simplify checks to see if a window is the root window



commit 8fe4870764ddee5780beae0d20f24fc048625903
Author: Jasper St. Pierre <jstpierre mecheye net>
Date:   Tue Feb 25 19:48:34 2014 -0500

    display: Simplify checks to see if a window is the root window

 src/core/display.c |   10 ++--------
 1 files changed, 2 insertions(+), 8 deletions(-)
---
diff --git a/src/core/display.c b/src/core/display.c
index 1ea1cc7..98717d1 100644
--- a/src/core/display.c
+++ b/src/core/display.c
@@ -2382,13 +2382,10 @@ handle_input_xevent (MetaDisplay *display,
                        "none"));
           if (GRAB_OP_IS_WINDOW_SWITCH (display->grab_op))
             {
-              MetaScreen *screen;
               meta_topic (META_DEBUG_WINDOW_OPS,
                           "Syncing to old stack positions.\n");
-              screen =
-                meta_display_screen_for_root (display, device_event->event);
 
-              if (screen!=NULL)
+              if (device_event->root == device_event->event)
                 meta_stack_set_positions (screen->stack,
                                           display->grab_old_window_stacking);
             }
@@ -2612,10 +2609,7 @@ handle_input_xevent (MetaDisplay *display,
       if (!window)
         {
           /* Check if the window is a root window. */
-          MetaScreen *screen =
-            meta_display_screen_for_root(display,
-                                         enter_event->event);
-          if (screen == NULL)
+          if (enter_event->root == enter_event->event)
             break;
 
           if (enter_event->evtype == XI_FocusIn &&


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