diff options
| author | Dana Jansens <danakj@orodu.net> | 2003-10-11 03:44:05 +0000 |
|---|---|---|
| committer | Dana Jansens <danakj@orodu.net> | 2003-10-11 03:44:05 +0000 |
| commit | 469b0c1ca9c78e3dd0c030dea7dcb9038f557fe6 (patch) | |
| tree | 94078c529be55bc7604fdca5b3bd27f1982dd037 /openbox | |
| parent | 34446063fa6f954f81200f2778c099865b374d2c (diff) | |
handle case where session saves a 0 width/height (for maximized windows!)
Diffstat (limited to 'openbox')
| -rw-r--r-- | openbox/client.c | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/openbox/client.c b/openbox/client.c index cc438b0f..8216c447 100644 --- a/openbox/client.c +++ b/openbox/client.c @@ -533,12 +533,14 @@ static void client_restore_session_state(ObClient *self) self->session = it->data; - RECT_SET(self->area, self->session->x, self->session->y, - self->session->w, self->session->h); + RECT_SET_POINT(self->area, self->session->x, self->session->y); self->positioned = TRUE; - if (self->session->w > 0 && self->session->h > 0) - XResizeWindow(ob_display, self->window, - self->session->w, self->session->h); + if (self->session->w > 0) + self->area.width = self->session->w; + 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->session->desktop : |
