]> Dogcows Code - chaz/openbox/commitdiff
only readjust the frame size when the client needs to be resized
authorDana Jansens <danakj@orodu.net>
Sat, 26 May 2007 23:12:29 +0000 (23:12 +0000)
committerDana Jansens <danakj@orodu.net>
Sat, 26 May 2007 23:12:29 +0000 (23:12 +0000)
openbox/client.c

index b69df9e09f47bb5065ce62cff793a297dc24fa47..948ecd8aff9663cd63d536f025991a23fa98c385 100644 (file)
@@ -400,15 +400,17 @@ void client_manage(Window window)
             a.height -= self->frame->size.top + self->frame->size.bottom;
 
             /* fit the window inside the area */
-            self->area.width = MIN(self->area.width, a.width);
-            self->area.height = MIN(self->area.height, a.height);
+            if (self->area.width > a.width || self->area.height > a.height) {
+                self->area.width = MIN(self->area.width, a.width);
+                self->area.height = MIN(self->area.height, a.height);
 
-            ob_debug("setting window size to %dx%d\n",
-                     self->area.width, self->area.height);
+                ob_debug("setting window size to %dx%d\n",
+                         self->area.width, self->area.height);
 
-            /* adjust the frame to the client's new size */
-            frame_adjust_area(self->frame, FALSE, TRUE, FALSE);
-            frame_adjust_client_area(self->frame);
+                /* adjust the frame to the client's new size */
+                frame_adjust_area(self->frame, FALSE, TRUE, FALSE);
+                frame_adjust_client_area(self->frame);
+            }
         }
 
         /* make sure the window is visible. */
This page took 0.031082 seconds and 4 git commands to generate.