summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/window.c20
1 files changed, 10 insertions, 10 deletions
diff --git a/src/window.c b/src/window.c
index f638a9f4..e0eb5b2a 100644
--- a/src/window.c
+++ b/src/window.c
@@ -3938,6 +3938,16 @@ moveResizeWindow (CompWindow *w,
if (!(xwcm & CWHeight))
xwc->height = w->serverHeight;
+ /* when horizontally maximized only allow width changes added by
+ addWindowSizeChanges or constrainNewWindowState */
+ if (w->state & CompWindowStateMaximizedHorzMask)
+ xwcm &= ~CWWidth;
+
+ /* when vertically maximized only allow height changes added by
+ addWindowSizeChanges or constrainNewWindowState */
+ if (w->state & CompWindowStateMaximizedVertMask)
+ xwcm &= ~CWHeight;
+
if (xwcm & (CWWidth | CWHeight))
{
int width, height;
@@ -3998,16 +4008,6 @@ moveResizeWindow (CompWindow *w,
(*w->screen->validateWindowResizeRequest) (w, &xwcm, xwc, source);
- /* when horizontally maximized only allow width changes added by
- addWindowSizeChanges */
- if (w->state & CompWindowStateMaximizedHorzMask)
- xwcm &= ~CWWidth;
-
- /* when vertically maximized only allow height changes added by
- addWindowSizeChanges */
- if (w->state & CompWindowStateMaximizedVertMask)
- xwcm &= ~CWHeight;
-
xwcm |= addWindowSizeChanges (w, xwc,
xwc->x, xwc->y,
xwc->width, xwc->height,