move windows before calcing struts. watch for windows on DESKTOP_ALL when removeing a desktop
This commit is contained in:
parent
f8e7ab509c
commit
1594828ec5
1 changed files with 4 additions and 4 deletions
|
@ -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! */
|
||||
|
|
Loading…
Reference in a new issue