[metacity/gnome-3-18] window: use the correct frame size during unmaximize



commit fa011ddaf6adaf69a9f2545b3d10563c5f2d4ae1
Author: Alberts Muktupāvels <alberts muktupavels gmail com>
Date:   Thu Apr 14 15:53:14 2016 +0300

    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

 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 57f82a1..20d75ab 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.
        */


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]