]> Dogcows Code - chaz/openbox/commitdiff
save premax values properly, individually for each direction
authorDana Jansens <danakj@orodu.net>
Mon, 6 Oct 2003 17:33:23 +0000 (17:33 +0000)
committerDana Jansens <danakj@orodu.net>
Mon, 6 Oct 2003 17:33:23 +0000 (17:33 +0000)
openbox/client.c

index 9a748e7ffb9043aaacc3b003a6da138dd74d64ec..774582e3fa1847d77e6170c648686d57116ca955 100644 (file)
@@ -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;
 
This page took 0.029136 seconds and 4 git commands to generate.