diff options
author | David Reveman <c99drn@cs.umu.se> | 2006-03-21 18:39:13 +0000 |
---|---|---|
committer | David Reveman <c99drn@cs.umu.se> | 2006-03-21 18:39:13 +0000 |
commit | b32b2ad3f23cbfc966aedd004313e0c5b2d127a4 (patch) | |
tree | 977b47d9c01e3f9e08f3c07972baaeffc7ac02b7 /gnome | |
parent | 930cbbccbb282d05563fb67a8fe9cf654085d8b2 (diff) |
Fix lower-window functionality in gnome-window-decorator
Diffstat (limited to 'gnome')
-rw-r--r-- | gnome/window-decorator/gnome-window-decorator.c | 21 |
1 files changed, 17 insertions, 4 deletions
diff --git a/gnome/window-decorator/gnome-window-decorator.c b/gnome/window-decorator/gnome-window-decorator.c index 42401d10..dc1933f8 100644 --- a/gnome/window-decorator/gnome-window-decorator.c +++ b/gnome/window-decorator/gnome-window-decorator.c @@ -3017,8 +3017,8 @@ lower_window (WnckWindow *win) GdkScreen *screen; Window xroot; XEvent ev; - WnckWindow *sibling; - GList *windows; + WnckWindow *sibling = NULL; + GList *windows, *w; gdkdisplay = gdk_display_get_default (); xdisplay = GDK_DISPLAY_XDISPLAY (gdkdisplay); @@ -3034,10 +3034,23 @@ lower_window (WnckWindow *win) } windows = wnck_screen_get_windows_stacked (wnck_screen_get_default ()); - if (!windows) + for (w = windows; w; w = w->next) + { + sibling = WNCK_WINDOW (w->data); + + if (wnck_window_get_state (sibling) & WNCK_WINDOW_STATE_HIDDEN) + continue; + + if (wnck_window_get_window_type (sibling) == WNCK_WINDOW_DESKTOP) + continue; + + break; + } + + if (!w) return; - sibling = WNCK_WINDOW (windows->data); + sibling = WNCK_WINDOW (w->data); if (sibling == win) return; |