From: Dana Jansens Date: Mon, 6 Oct 2003 17:33:23 +0000 (+0000) Subject: save premax values properly, individually for each direction X-Git-Url: https://git.dogcows.com/gitweb?a=commitdiff_plain;h=f55766cc555c87e26ea4cc973b6eb971771b411c;p=chaz%2Fopenbox save premax values properly, individually for each direction --- diff --git a/openbox/client.c b/openbox/client.c index 9a748e7f..774582e3 100644 --- a/openbox/client.c +++ b/openbox/client.c @@ -2209,8 +2209,18 @@ void client_maximize(ObClient *self, gboolean max, int dir, gboolean savearea) h = self->area.height; if (max) { - if (savearea) - self->pre_max_area = self->area; + if (savearea) { + if ((dir == 0 || dir == 1) && !self->max_horz) { /* horz */ + RECT_SET(self->pre_max_area, + self->area.x, self->pre_max_area.y, + self->area.width, self->pre_max_area.height); + } + if ((dir == 0 || dir == 2) && !self->max_vert) { /* vert */ + RECT_SET(self->pre_max_area, + self->pre_max_area.x, self->area.y, + self->pre_max_area.width, self->area.height); + } + } } else { Rect *a;