set the desktop hint if the desktop is changed by the session code
Dana Jansens danakj@orodu.net
1 files changed,
8 insertions(+),
4 deletions(-)
jump to
M
openbox/client.c
→
openbox/client.c
@@ -237,9 +237,6 @@
client_get_all(self); client_restore_session_state(self); - /* set the desktop hint, to make sure that it always exists */ - PROP_SET32(self->window, net_wm_desktop, cardinal, self->desktop); - client_change_state(self); /* remove the client's border (and adjust re gravity) */@@ -472,10 +469,13 @@ s = session_state_find(self);
if (!(s)) return; RECT_SET(self->area, s->x, s->y, s->w, s->h); + self->positioned = TRUE; XResizeWindow(ob_display, self->window, s->w, s->h); - self->positioned = TRUE; + self->desktop = s->desktop == DESKTOP_ALL ? s->desktop : MIN(screen_num_desktops - 1, s->desktop); + PROP_SET32(self->window, net_wm_desktop, cardinal, self->desktop); + self->shaded = s->shaded; self->iconic = s->iconic; self->skip_pager = s->skip_pager;@@ -703,6 +703,10 @@ }
if (!trdesk) /* defaults to the current desktop */ self->desktop = screen_desktop; + } + if (self->desktop != d) { + /* set the desktop hint, to make sure that it always exists */ + PROP_SET32(self->window, net_wm_desktop, cardinal, self->desktop); } }