mirror of
https://github.com/gryf/wmaker.git
synced 2025-12-19 20:38:08 +01:00
wmaker: Clear maximized flag of a maximized window when moved.
If a user moves a window which is currently maximized, the current behavior is to keep the window geometry and maximized status unchanged. This can lead to peculiar behavior. For example, suppose a user maximizes a window to the right half of the screen (either through the window menu, keyboard shortcut, or new snapping feature), then moves it, and then attempts maximize it to the right half of the screen again. Instead of the expected result, the window is unmaximized and returned to its original geometry. This patch changes the behavior by clearing the maximization flag when a maximized window is moved. Then, when a window is maximized and then moved, it can be maximized again without issues. Signed-off-by: Carlos R. Mafra <crmafra@gmail.com>
This commit is contained in:
committed by
Carlos R. Mafra
parent
a8f0b68eaf
commit
38b58112ac
@@ -1723,6 +1723,11 @@ int wMouseMoveWindow(WWindow * wwin, XEvent * ev)
|
||||
} else if (abs(ev->xmotion.x_root - event.xmotion.x_root) >= MOVE_THRESHOLD
|
||||
|| abs(ev->xmotion.y_root - event.xmotion.y_root) >= MOVE_THRESHOLD) {
|
||||
|
||||
if (wwin->flags.maximized) {
|
||||
wwin->flags.maximized = 0;
|
||||
wwin->flags.old_maximized = 0;
|
||||
}
|
||||
|
||||
XChangeActivePointerGrab(dpy, ButtonMotionMask
|
||||
| ButtonReleaseMask | ButtonPressMask,
|
||||
wPreferences.cursor[WCUR_MOVE], CurrentTime);
|
||||
|
||||
Reference in New Issue
Block a user