mirror of
https://github.com/gryf/wmaker.git
synced 2026-10-06 09:20:34 +02: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:
1 parent
4bce3e3805
commit
e4fcd515fe
2 files changed
+18
-5
No files matched your search
+6
-1
@@ -254,7 +254,12 @@ void wClientConfigure(WWindow * wwin, XConfigureRequestEvent * xcre)
|
||||
else
|
||||
nheight = wwin->frame->core->height - wwin->frame->top_width - wwin->frame->bottom_width;
|
||||
|
||||
wWindowConfigure(wwin, nx, ny, nwidth, nheight);
|
||||
if (nwidth != wwin->old_geometry.width)
|
||||
wwin->flags.maximized &= ~(MAX_HORIZONTAL | MAX_MAXIMUS);
|
||||
if (nheight != wwin->old_geometry.height)
|
||||
wwin->flags.maximized &= ~(MAX_VERTICAL | MAX_LEFTHALF | MAX_RIGHTHALF | MAX_MAXIMUS);
|
||||
|
||||
wWindowConfigure(wwin, nx, ny, nwidth, nheight);
|
||||
wwin->old_geometry.x = nx;
|
||||
wwin->old_geometry.y = ny;
|
||||
wwin->old_geometry.width = nwidth;
|
||||
|
||||
+12
-4
@@ -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