diff --git a/src/client.c b/src/client.c index 6dee84fc5e2f007ab9b02e9ae26d2dffa93083b7..119e16f3f58403fe845adaac8fde916a95942c6c 100644 --- a/src/client.c +++ b/src/client.c @@ -3706,6 +3706,7 @@ clientResize (Client * c, int corner, XEvent * ev) DisplayInfo *display_info = NULL; XWindowChanges wc; MoveResizeData passdata; + int w_orig, h_orig; gboolean g1, g2; gboolean restore_opacity = FALSE; @@ -3722,11 +3723,8 @@ clientResize (Client * c, int corner, XEvent * ev) passdata.use_keys = FALSE; passdata.grab = FALSE; passdata.corner = corner; - - if (FLAG_TEST (c->flags, CLIENT_FLAG_MAXIMIZED)) - { - clientRemoveMaximizeFlag (c); - } + w_orig = c->width; + h_orig = c->height; if (ev->type == KeyPress) { @@ -3809,6 +3807,12 @@ clientResize (Client * c, int corner, XEvent * ev) compositorWindowSetOpacity (display_info, c->frame, c->opacity); } + if (FLAG_TEST (c->flags, CLIENT_FLAG_MAXIMIZED) && + ((w_orig != c->width) || (h_orig != c->height))) + { + clientRemoveMaximizeFlag (c); + } + wc.x = c->x; wc.y = c->y; wc.width = c->width;