1
0
mirror of https://github.com/gryf/wmaker.git synced 2025-12-19 20:38: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:
dan
2005-05-15 16:45:02 +00:00
parent f8b3a774be
commit 69730273b1
3 changed files with 18 additions and 10 deletions

View File

@@ -21,7 +21,11 @@ Changes since version 0.91.0:
move was initiated by the client
- improved hide/unhide animation for applications with multiple windows
(only animate the active window hiding/unhiding, which makes Window Maker
faster and more responsive for such applications).
faster and more responsive for such applications). This also makes the
restart operation much faster.
- 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.
Changes since version 0.90.0:

View File

@@ -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");

View File

@@ -872,7 +872,7 @@ updateStateHint(WWindow *wwin, Bool changedWorkspace, Bool del) /* changeable */
XDeleteProperty(dpy, wwin->client_win, net_wm_state);
}
} else {
Atom state[11]; /* nr of defined state atoms */
Atom state[15]; /* nr of defined state atoms */
int i = 0;
if(changedWorkspace || (wPreferences.sticky_icons && !IS_OMNIPRESENT(wwin)))
@@ -895,7 +895,7 @@ updateStateHint(WWindow *wwin, Bool changedWorkspace, Bool del) /* changeable */
state[i++] = net_wm_state_skip_pager;
if (wwin->flags.miniaturized && wPreferences.sticky_icons) {
if( !IS_OMNIPRESENT(wwin))
if (!IS_OMNIPRESENT(wwin))
updateWorkspaceHint(wwin, True, False);
state[i++] = net_wm_state_sticky;
}
@@ -1057,7 +1057,7 @@ doStateAtom(WWindow *wwin, Atom state, int set, Bool init)
set = !(wwin->flags.maximized & MAX_VERTICAL);
}
if (init) {
wwin->flags.maximized = set;
wwin->flags.maximized |= (set ? MAX_VERTICAL : 0);
} else {
if (set) {
wMaximizeWindow(wwin, wwin->flags.maximized | MAX_VERTICAL);
@@ -1070,7 +1070,7 @@ doStateAtom(WWindow *wwin, Atom state, int set, Bool init)
set = !(wwin->flags.maximized & MAX_HORIZONTAL);
}
if (init) {
wwin->flags.maximized = set;
wwin->flags.maximized |= (set ? MAX_HORIZONTAL : 0);
} else {
if (set) {
wMaximizeWindow(wwin, wwin->flags.maximized | MAX_HORIZONTAL);