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
This commit is contained in:
Owen W. Taylor 2009-06-15 17:15:38 -04:00
parent ace0521cba
commit 5518fee61c

View File

@ -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);
}