[mutter/override-redirect-exclusion: 8/15] meta_screen_foreach_window(): Skip override-redirect windows



commit 5518fee61c5579e17b76383723f11e6cc3d691fe
Author: Owen W. Taylor <otaylor fishsoup net>
Date:   Mon Jun 15 17:15:38 2009 -0400

    meta_screen_foreach_window(): Skip override-redirect windows
    
    Don't include override-redirect windows when iterating the windows
    in the screen. We don't need them for any of the current uses:
    
     - Queueing redraws and resizes on managed windows
     - Checking which windows should be added to a new workspace
    
    http://bugzilla.gnome.org/show_bug.cgi?id=582639

 src/core/screen.c |   11 ++++++++++-
 1 files changed, 10 insertions(+), 1 deletions(-)
---
diff --git a/src/core/screen.c b/src/core/screen.c
index b3fca98..7ab8f4f 100644
--- a/src/core/screen.c
+++ b/src/core/screen.c
@@ -1044,6 +1044,15 @@ listify_func (gpointer key, gpointer value, gpointer data)
   *listp = g_slist_prepend (*listp, value);
 }
 
+/**
+ * meta_screen_foreach_window:
+ * @screen: a #MetaScreen
+ * @func: function to call for each window
+ * @data: user data to pass to @func
+ *
+ * Calls the specified function for each window on the screen,
+ * ignoring override-redirect windows.
+ */
 void
 meta_screen_foreach_window (MetaScreen *screen,
                             MetaScreenWindowFunc func,
@@ -1074,7 +1083,7 @@ meta_screen_foreach_window (MetaScreen *screen,
         {
           MetaWindow *window = tmp->data;
 
-          if (window->screen == screen)
+          if (window->screen == screen && !window->override_redirect)
             (* func) (screen, window, data);
         }
       



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