mirror of
https://github.com/gryf/wmaker.git
synced 2025-12-19 20:38:08 +01:00
Maximizing a resized window
When a maximized window is resized (either using wmaker or because the application changed the window size), and you want to maximize it again, you first have to unmaximize it (because wmaker thinks the window is still maximized), and only then you can maximize it. The following patch corrects this behaviour.
This commit is contained in:
committed by
Carlos R. Mafra
parent
4bce3e3805
commit
e4fcd515fe
@@ -1510,11 +1510,15 @@ int wKeyboardMoveResizeWindow(WWindow * wwin)
|
||||
}
|
||||
}
|
||||
} else {
|
||||
if (wwin->client.width != ww)
|
||||
if (wwin->client.width != ww) {
|
||||
wwin->flags.user_changed_width = 1;
|
||||
wwin->flags.maximized &= ~(MAX_HORIZONTAL | MAX_MAXIMUS);
|
||||
}
|
||||
|
||||
if (wwin->client.height != wh - vert_border)
|
||||
if (wwin->client.height != wh - vert_border) {
|
||||
wwin->flags.user_changed_height = 1;
|
||||
wwin->flags.maximized &= ~(MAX_VERTICAL | MAX_LEFTHALF | MAX_RIGHTHALF | MAX_MAXIMUS);
|
||||
}
|
||||
|
||||
wWindowConfigure(wwin, src_x + off_x, src_y + off_y, ww, wh - vert_border);
|
||||
wWindowSynthConfigureNotify(wwin);
|
||||
@@ -2070,11 +2074,15 @@ void wMouseResizeWindow(WWindow * wwin, XEvent * ev)
|
||||
WMUnmapWidget(scr->gview);
|
||||
XUngrabServer(dpy);
|
||||
|
||||
if (wwin->client.width != fw)
|
||||
if (wwin->client.width != fw) {
|
||||
wwin->flags.user_changed_width = 1;
|
||||
wwin->flags.maximized &= ~(MAX_HORIZONTAL | MAX_MAXIMUS);
|
||||
}
|
||||
|
||||
if (wwin->client.height != fh - vert_border)
|
||||
if (wwin->client.height != fh - vert_border) {
|
||||
wwin->flags.user_changed_height = 1;
|
||||
wwin->flags.maximized &= ~(MAX_VERTICAL | MAX_LEFTHALF | MAX_RIGHTHALF | MAX_MAXIMUS);
|
||||
}
|
||||
|
||||
wWindowConfigure(wwin, fx, fy, fw, fh - vert_border);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user