screen: Fix a potentially endless loop

We always need to move the list pointer forward.

https://bugzilla.gnome.org/show_bug.cgi?id=693475
This commit is contained in:
Rui Matos 2013-02-09 14:36:59 +01:00
parent d482590c84
commit 380154af0a

View File

@ -1209,10 +1209,9 @@ meta_screen_foreach_window (MetaScreen *screen,
{ {
MetaWindow *window = tmp->data; MetaWindow *window = tmp->data;
if (!META_IS_WINDOW (window)) if (META_IS_WINDOW (window) &&
continue; window->screen == screen &&
!window->override_redirect)
if (window->screen == screen && !window->override_redirect)
(* func) (screen, window, data); (* func) (screen, window, data);
} }