handle case where session saves a 0 width/height (for maximized windows!)
This commit is contained in:
parent
34446063fa
commit
469b0c1ca9
1 changed files with 7 additions and 5 deletions
|
@ -533,12 +533,14 @@ static void client_restore_session_state(ObClient *self)
|
||||||
|
|
||||||
self->session = it->data;
|
self->session = it->data;
|
||||||
|
|
||||||
RECT_SET(self->area, self->session->x, self->session->y,
|
RECT_SET_POINT(self->area, self->session->x, self->session->y);
|
||||||
self->session->w, self->session->h);
|
|
||||||
self->positioned = TRUE;
|
self->positioned = TRUE;
|
||||||
if (self->session->w > 0 && self->session->h > 0)
|
if (self->session->w > 0)
|
||||||
XResizeWindow(ob_display, self->window,
|
self->area.width = self->session->w;
|
||||||
self->session->w, self->session->h);
|
if (self->session->h > 0)
|
||||||
|
self->area.height = self->session->h;
|
||||||
|
XResizeWindow(ob_display, self->window,
|
||||||
|
self->area.width, self->area.height);
|
||||||
|
|
||||||
self->desktop = (self->session->desktop == DESKTOP_ALL ?
|
self->desktop = (self->session->desktop == DESKTOP_ALL ?
|
||||||
self->session->desktop :
|
self->session->desktop :
|
||||||
|
|
Loading…
Reference in a new issue