mirror of
https://github.com/gryf/wmaker.git
synced 2025-12-20 21:08:08 +01:00
- fixed bug with windows shrinking to very small sizes when Unmaximize was
used on them, after they were closed in a maximized state. - fixed bug with restoring maximized state from NetWM atoms.
This commit is contained in:
@@ -474,7 +474,7 @@ wMaximizeWindow(WWindow *wwin, int directions)
|
||||
void
|
||||
wUnmaximizeWindow(WWindow *wwin)
|
||||
{
|
||||
int restore_x, restore_y;
|
||||
int x, y, w, h;
|
||||
|
||||
if (!wwin->flags.maximized)
|
||||
return;
|
||||
@@ -483,13 +483,17 @@ wUnmaximizeWindow(WWindow *wwin)
|
||||
wwin->flags.skip_next_animation = 1;
|
||||
wUnshadeWindow(wwin);
|
||||
}
|
||||
restore_x = (wwin->flags.maximized & MAX_HORIZONTAL) ?
|
||||
x = ((wwin->flags.maximized & MAX_HORIZONTAL) && wwin->old_geometry.x) ?
|
||||
wwin->old_geometry.x : wwin->frame_x;
|
||||
restore_y = (wwin->flags.maximized & MAX_VERTICAL) ?
|
||||
y = ((wwin->flags.maximized & MAX_VERTICAL) && wwin->old_geometry.y) ?
|
||||
wwin->old_geometry.y : wwin->frame_y;
|
||||
w = wwin->old_geometry.width ?
|
||||
wwin->old_geometry.width : wwin->client.width;
|
||||
h = wwin->old_geometry.height ?
|
||||
wwin->old_geometry.height : wwin->client.height;
|
||||
|
||||
wwin->flags.maximized = 0;
|
||||
wWindowConfigure(wwin, restore_x, restore_y,
|
||||
wwin->old_geometry.width, wwin->old_geometry.height);
|
||||
wWindowConfigure(wwin, x, y, w, h);
|
||||
|
||||
WMPostNotificationName(WMNChangedState, wwin, "maximize");
|
||||
|
||||
|
||||
Reference in New Issue
Block a user