diff options
| author | Dana Jansens <danakj@orodu.net> | 2003-04-28 19:36:59 +0000 |
|---|---|---|
| committer | Dana Jansens <danakj@orodu.net> | 2003-04-28 19:36:59 +0000 |
| commit | 1594828ec552a7e4549b33ca2fe33115df3869fb (patch) | |
| tree | a29eb2b17701d13f328b37b9f01e4cf4dd76c0d4 /openbox/screen.c | |
| parent | f8e7ab509c20a50610760c02278ca832a9b3c727 (diff) | |
move windows before calcing struts. watch for windows on DESKTOP_ALL when removeing a desktop
Diffstat (limited to 'openbox/screen.c')
| -rw-r--r-- | openbox/screen.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/openbox/screen.c b/openbox/screen.c index 03cee447..7f9b4397 100644 --- a/openbox/screen.c +++ b/openbox/screen.c @@ -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! */ |
