diff --git a/src/moveresize.c b/src/moveresize.c index 411520d..9b790e4 100644 --- a/src/moveresize.c +++ b/src/moveresize.c @@ -1029,17 +1029,20 @@ clientMoveEventFilter (XEvent * xevent, gpointer data) if ((ABS (xevent->xmotion.x_root - passdata->mx) > 15) || (ABS (xevent->xmotion.y_root - passdata->my) > 15)) { - gboolean size_changed; + gboolean size_changed = FALSE; /* to keep the distance from the edges of the window proportional. */ double xratio, yratio; xratio = (xevent->xmotion.x_root - frameExtentX (c)) / (double) frameExtentWidth (c); yratio = (xevent->xmotion.y_root - frameExtentY (c)) / (double) frameExtentHeight (c); - size_changed = clientToggleMaximized (c, c->flags & CLIENT_FLAG_MAXIMIZED, FALSE); - if (clientRestoreSizePos (c)) - { - size_changed = TRUE; + if (!FLAG_TEST(c->flags, CLIENT_FLAG_MAXIMIZED_HORIZ) + && !FLAG_TEST(c->flags, CLIENT_FLAG_MAXIMIZED_VERT)) { + size_changed = clientToggleMaximized (c, c->flags & CLIENT_FLAG_MAXIMIZED, FALSE); + if (clientRestoreSizePos (c)) + { + size_changed = TRUE; + } } if (size_changed) {