]> Dogcows Code - chaz/openbox/commitdiff
move windows before calcing struts. watch for windows on DESKTOP_ALL when removeing...
authorDana Jansens <danakj@orodu.net>
Mon, 28 Apr 2003 19:36:59 +0000 (19:36 +0000)
committerDana Jansens <danakj@orodu.net>
Mon, 28 Apr 2003 19:36:59 +0000 (19:36 +0000)
openbox/screen.c

index 03cee447e7456c40093da8f37ac4faf6fe6ebe5d..7f9b43971e1614555ac71293be4b8ffeced420e3 100644 (file)
@@ -238,9 +238,6 @@ void screen_set_num_desktops(guint num)
     PROP_SETA32(ob_root, net_desktop_viewport, cardinal, viewport, num * 2);
     g_free(viewport);
 
-    /* change our struts/area to match */
-    screen_update_struts();
-
     /* the number of rows/columns will differ */
     screen_update_layout();
 
@@ -260,10 +257,13 @@ void screen_set_num_desktops(guint num)
     /* move windows on desktops that will no longer exist! */
     for (it = client_list; it != NULL; it = it->next) {
         Client *c = it->data;
-        if (c->desktop >= num)
+        if (c->desktop >= num && c->desktop != DESKTOP_ALL)
             client_set_desktop(c, num - 1, FALSE);
     }
 
+    /* change our struts/area to match (after moving windows) */
+    screen_update_struts();
+
     dispatch_ob(Event_Ob_NumDesktops, num, old);
 
     /* change our desktop if we're on one that no longer exists! */
This page took 0.02721 seconds and 4 git commands to generate.