X-Git-Url: https://git.dogcows.com/gitweb?a=blobdiff_plain;f=openbox%2Fscreen.c;h=2e6ff3f14fb8ace58ebb64d5ba8132a10f581c9a;hb=dabcb558cd10295f9382607936ead64d8b210b99;hp=21fff19b6d8a41be507158c01a4a16305c0bee33;hpb=d42335e54d9eb70957eb3f4938b69cc3682cfec2;p=chaz%2Fopenbox 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); }