diff options
author | Danny Baumann <dannybaumann@web.de> | 2009-01-06 13:01:43 +0100 |
---|---|---|
committer | Danny Baumann <dannybaumann@web.de> | 2009-01-06 13:01:43 +0100 |
commit | 0c832437ed554b89df3c78a2ed6c01a91ef08b38 (patch) | |
tree | 8bae35125e33ea6ec8221395a116aa63f4a8fab8 /src | |
parent | cc58577d8ea230de8cf029ccdabe62b07ab54ca9 (diff) |
Clear CWWidth/CWHeight for maximized windows before constraining window
size to make sure be don't clear out the bits set by
constrainNewWindowSize.
Diffstat (limited to 'src')
-rw-r--r-- | src/window.c | 20 |
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, |