Fix problem with window unmaximization

A mismerge of the Metacity commit "4943d79 Prevent window self-maximisation"
caused the window's user set size and position to be saved *before*
actually resizing the window to the unmaximized position rather than after.

This meant that after unmaximization the window was in an inconsistent
state and anything that caused a resize to be queued (like a change in
window properties by the application) would cause it to pop back to
the maximized size and position.

https://bugzilla.gnome.org/show_bug.cgi?id=621413
This commit is contained in:
Owen W. Taylor 2010-06-14 16:40:38 -04:00
parent 275a6ec63f
commit ff5a73de49

View File

@ -3235,10 +3235,6 @@ meta_window_unmaximize (MetaWindow *window,
window->display->grab_anchor_window_pos = target_rect;
}
/* Make sure user_rect is current.
*/
force_save_user_window_placement (window);
if (window->display->compositor)
{
MetaRectangle old_rect, new_rect;
@ -3268,6 +3264,10 @@ meta_window_unmaximize (MetaWindow *window,
target_rect.height);
}
/* Make sure user_rect is current.
*/
force_save_user_window_placement (window);
recalc_window_features (window);
set_net_wm_state (window);
}