summaryrefslogtreecommitdiff
path: root/openbox/client.c
diff options
context:
space:
mode:
authorDana Jansens <danakj@orodu.net>2008-02-28 10:00:29 -0500
committerDana Jansens <danakj@orodu.net>2008-02-28 12:31:36 -0500
commita4a1a667fc341b1fb2c420b6b699a9074fefbdad (patch)
treec53d46e7364ae9d7849fb854d4aef018828dbeac /openbox/client.c
parent7a6485e4bb4ceb88f6279d4bce054c1aa30d45dd (diff)
If a window is maximized and has FUNC_MAXIMIZE disabled, still let it unmaximize. When normal hints change and we reconfigure, the w/h of the window may not have changed - rather the minw/maxh etc may have changed. So in client_try_configure always run through the code that checks them to see if the client should be resized or whatever.
Diffstat (limited to 'openbox/client.c')
-rw-r--r--openbox/client.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/openbox/client.c b/openbox/client.c
index 02008de9..816fa922 100644
--- a/openbox/client.c
+++ b/openbox/client.c
@@ -2874,8 +2874,10 @@ void client_try_configure(ObClient *self, gint *x, gint *y, gint *w, gint *h,
/* gets the client's position */
frame_frame_gravity(self->frame, x, y);
- /* work within the preferred sizes given by the window */
- if (!(*w == self->area.width && *h == self->area.height)) {
+ /* work within the preferred sizes given by the window, these may have
+ changed rather than it's requested width and height, so always run
+ through this code */
+ {
gint basew, baseh, minw, minh;
gint incw, inch;
gfloat minratio, maxratio;
@@ -3254,7 +3256,7 @@ void client_maximize(ObClient *self, gboolean max, gint dir)
gint x, y, w, h;
g_assert(dir == 0 || dir == 1 || dir == 2);
- if (!(self->functions & OB_CLIENT_FUNC_MAXIMIZE)) return; /* can't */
+ if (!(self->functions & OB_CLIENT_FUNC_MAXIMIZE) && max) return;/* can't */
/* check if already done */
if (max) {