]> Dogcows Code - chaz/openbox/blobdiff - openbox/screen.c
kill the c dir
[chaz/openbox] / openbox / screen.c
index b2975e7283c93e04c4209bb9c66f9302707f06bd..2e6ff3f14fb8ace58ebb64d5ba8132a10f581c9a 100644 (file)
@@ -184,10 +184,10 @@ void screen_shutdown()
 
 void screen_resize()
 {
-    /* Set the _NET_DESKTOP_GEOMETRY hint */
     /* XXX RandR support here? */
     int geometry[2];
 
+    /* Set the _NET_DESKTOP_GEOMETRY hint */
     geometry[0] = WidthOfScreen(ScreenOfDisplay(ob_display, ob_screen));
     geometry[1] = HeightOfScreen(ScreenOfDisplay(ob_display, ob_screen));
     PROP_SET32A(ob_root, net_desktop_geometry, cardinal, geometry, 2);
@@ -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);
 }
 
This page took 0.020472 seconds and 4 git commands to generate.