diff options
author | Alberts Muktupāvels <alberts.muktupavels@gmail.com> | 2016-04-14 15:53:14 +0300 |
---|---|---|
committer | Alberts Muktupāvels <alberts.muktupavels@gmail.com> | 2016-04-15 14:06:02 +0300 |
commit | fa011ddaf6adaf69a9f2545b3d10563c5f2d4ae1 (patch) | |
tree | 880fabf991fb71d768f8ab03db7bc80ce46d0c5d | |
parent | 04c99abaa2825c0c5f441542da1e698cfcb92f01 (diff) | |
download | metacity-fa011ddaf6adaf69a9f2545b3d10563c5f2d4ae1.tar.gz |
window: use the correct frame size during unmaximize
When unmaximizing, we changed bits of window state, then called
out to code that used the frame extents *before* we cleared old
cached extents. Clear the cache up-front as soon as we change the
window state.
Based on mutter commit:
https://git.gnome.org/browse/mutter/commit/?id=8d5ab6b5b34a3dbeaba6033c31d06090579ed574
-rw-r--r-- | src/core/window.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/src/core/window.c b/src/core/window.c index 57f82a17..20d75ab7 100644 --- a/src/core/window.c +++ b/src/core/window.c @@ -2765,6 +2765,12 @@ meta_window_unmaximize (MetaWindow *window, window->maximized_vertically = window->maximized_vertically && !unmaximize_vertically; + /* recalc_window_features() will eventually clear the cached frame + * extents, but we need the correct frame extents in the code below, + * so invalidate the old frame extents manually up front. + */ + meta_window_frame_size_changed (window); + /* Unmaximize to the saved_rect position in the direction(s) * being unmaximized. */ |