summaryrefslogtreecommitdiff
path: root/openbox/screen.c
diff options
context:
space:
mode:
authorDana Jansens <danakj@orodu.net>2003-03-20 22:36:01 +0000
committerDana Jansens <danakj@orodu.net>2003-03-20 22:36:01 +0000
commite8ed8b3c2aa4304e218cce094b1aebe9368357fb (patch)
tree90e6b13904d6d5d40716a3de47f551918696c511 /openbox/screen.c
parent0a2aa0892473c9fc61bfedd753fbb136a3f7e864 (diff)
show windows before hiding when switching desktops
Diffstat (limited to 'openbox/screen.c')
-rw-r--r--openbox/screen.c14
1 files changed, 8 insertions, 6 deletions
diff --git a/openbox/screen.c b/openbox/screen.c
index 21fff19b..2e6ff3f1 100644
--- a/openbox/screen.c
+++ b/openbox/screen.c
@@ -278,12 +278,7 @@ void screen_set_desktop(guint num)
if (old == num) return;
- /* hide windows from bottom to top */
- for (it = g_list_last(stacking_list); it != NULL; it = it->prev) {
- Client *c = it->data;
- if (c->frame->visible && !client_should_show(c))
- engine_frame_hide(c->frame);
- }
+ /* show windows before hiding the rest to lessen the enter/leave events */
/* show windows from top to bottom */
for (it = stacking_list; it != NULL; it = it->next) {
@@ -292,6 +287,13 @@ void screen_set_desktop(guint num)
engine_frame_show(c->frame);
}
+ /* hide windows from bottom to top */
+ for (it = g_list_last(stacking_list); it != NULL; it = it->prev) {
+ Client *c = it->data;
+ if (c->frame->visible && !client_should_show(c))
+ engine_frame_hide(c->frame);
+ }
+
dispatch_ob(Event_Ob_Desktop, num, old);
}