[mutter/wayland] window: Clean up is_our_xwindow



commit f166240225b6ab110b091520103d0370d51899ac
Author: Jasper St. Pierre <jstpierre mecheye net>
Date:   Sat Feb 1 18:45:27 2014 -0500

    window: Clean up is_our_xwindow

 src/core/window.c |   38 ++++++++++++++++++++------------------
 1 files changed, 20 insertions(+), 18 deletions(-)
---
diff --git a/src/core/window.c b/src/core/window.c
index a58dc7f..69f2887 100644
--- a/src/core/window.c
+++ b/src/core/window.c
@@ -777,25 +777,27 @@ is_our_xwindow (MetaDisplay       *display,
                 Window             xwindow,
                 XWindowAttributes *attrs)
 {
-  /* A black list of override redirect windows that we don't need to manage: */
-  if (attrs->override_redirect &&
-      (xwindow == screen->no_focus_window ||
-       xwindow == screen->flash_window ||
-       xwindow == screen->wm_sn_selection_window ||
-       attrs->class == InputOnly ||
-       /* any windows created via meta_create_offscreen_window: */
-       (attrs->x == -100 && attrs->y == -100
-       && attrs->width == 1 && attrs->height == 1) ||
-       xwindow == screen->wm_cm_selection_window ||
-       xwindow == screen->guard_window ||
-       (display->compositor &&
-        xwindow == XCompositeGetOverlayWindow (display->xdisplay,
-                                              screen->xroot)
-       )
-      )
-     ) {
+  if (xwindow == screen->no_focus_window)
+    return TRUE;
+
+  if (xwindow == screen->flash_window)
+    return TRUE;
+
+  if (xwindow == screen->wm_sn_selection_window)
+    return TRUE;
+
+  if (xwindow == screen->wm_cm_selection_window)
+    return TRUE;
+
+  if (xwindow == screen->guard_window)
+    return TRUE;
+
+  if (display->compositor && xwindow == XCompositeGetOverlayWindow (display->xdisplay, screen->xroot))
+    return TRUE;
+
+  /* Any windows created via meta_create_offscreen_window */
+  if (attrs->override_redirect && attrs->x == -100 && attrs->height == -100 && attrs->width == 1 && 
attrs->height == 1)
     return TRUE;
-  }
 
   return FALSE;
 }


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