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 move was initiated by the client
- improved hide/unhide animation for applications with multiple windows - improved hide/unhide animation for applications with multiple windows
(only animate the active window hiding/unhiding, which makes Window Maker (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: Changes since version 0.90.0:

View File

@@ -474,7 +474,7 @@ wMaximizeWindow(WWindow *wwin, int directions)
void void
wUnmaximizeWindow(WWindow *wwin) wUnmaximizeWindow(WWindow *wwin)
{ {
int restore_x, restore_y; int x, y, w, h;
if (!wwin->flags.maximized) if (!wwin->flags.maximized)
return; return;
@@ -483,13 +483,17 @@ wUnmaximizeWindow(WWindow *wwin)
wwin->flags.skip_next_animation = 1; wwin->flags.skip_next_animation = 1;
wUnshadeWindow(wwin); 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; 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; 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; wwin->flags.maximized = 0;
wWindowConfigure(wwin, restore_x, restore_y, wWindowConfigure(wwin, x, y, w, h);
wwin->old_geometry.width, wwin->old_geometry.height);
WMPostNotificationName(WMNChangedState, wwin, "maximize"); 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); XDeleteProperty(dpy, wwin->client_win, net_wm_state);
} }
} else { } else {
Atom state[11]; /* nr of defined state atoms */ Atom state[15]; /* nr of defined state atoms */
int i = 0; int i = 0;
if(changedWorkspace || (wPreferences.sticky_icons && !IS_OMNIPRESENT(wwin))) 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; state[i++] = net_wm_state_skip_pager;
if (wwin->flags.miniaturized && wPreferences.sticky_icons) { if (wwin->flags.miniaturized && wPreferences.sticky_icons) {
if( !IS_OMNIPRESENT(wwin)) if (!IS_OMNIPRESENT(wwin))
updateWorkspaceHint(wwin, True, False); updateWorkspaceHint(wwin, True, False);
state[i++] = net_wm_state_sticky; 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); set = !(wwin->flags.maximized & MAX_VERTICAL);
} }
if (init) { if (init) {
wwin->flags.maximized = set; wwin->flags.maximized |= (set ? MAX_VERTICAL : 0);
} else { } else {
if (set) { if (set) {
wMaximizeWindow(wwin, wwin->flags.maximized | MAX_VERTICAL); 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); set = !(wwin->flags.maximized & MAX_HORIZONTAL);
} }
if (init) { if (init) {
wwin->flags.maximized = set; wwin->flags.maximized |= (set ? MAX_HORIZONTAL : 0);
} else { } else {
if (set) { if (set) {
wMaximizeWindow(wwin, wwin->flags.maximized | MAX_HORIZONTAL); wMaximizeWindow(wwin, wwin->flags.maximized | MAX_HORIZONTAL);