summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDana Jansens <danakj@orodu.net>2007-05-26 23:12:29 +0000
committerDana Jansens <danakj@orodu.net>2007-05-26 23:12:29 +0000
commita38012f2fff30aa48913c5020e72f537c742542f (patch)
treee30f1c11ea2f2a1585b28bad3454666b724dd3ee
parent5883164b197e81a8e76a316344f5edea57252612 (diff)
only readjust the frame size when the client needs to be resized
-rw-r--r--openbox/client.c16
1 files changed, 9 insertions, 7 deletions
diff --git a/openbox/client.c b/openbox/client.c
index b69df9e0..948ecd8a 100644
--- a/openbox/client.c
+++ b/openbox/client.c
@@ -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. */