[gnome-shell/gnome-40] windowManager: Unminimize a window to its buffer rect geometry



commit 5c75f3e4fafb350fe94a0a6307d33b2025c7183b
Author: Daniel van Vugt <daniel van vugt canonical com>
Date:   Thu Dec 16 15:36:43 2021 +0800

    windowManager: Unminimize a window to its buffer rect geometry
    
    If you slow down the unminimize animation you will notice it overshoots and
    then snaps back, but only for decorated windows. Undecorated windows would
    unminimize to their correct position. So we remove decorations from the
    equation and now all window types unminimize to their correct position.
    
    This wasn't noticeable because the unminimize animation velocity is usually
    so high at the end (EASE_IN_EXPO) that there are no frames rendered near the
    end of the curve to show it had overshot.
    
    This appears to be consistent with the Mutter source - associating the
    actor geometry with `buffer_rect` and not `frame_rect`. See
    `meta_window_actor_sync_actor_geometry` for example.
    
    Related to: https://bugzilla.gnome.org/show_bug.cgi?id=786789#c1
    
    Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/2066>
    (cherry picked from commit ca1291e418d71effd868909f90d3f9b5fd1b2565)

 js/ui/windowManager.js | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
---
diff --git a/js/ui/windowManager.js b/js/ui/windowManager.js
index 48fa9a5934..03bbf055a9 100644
--- a/js/ui/windowManager.js
+++ b/js/ui/windowManager.js
@@ -1240,7 +1240,7 @@ var WindowManager = class {
                 actor.set_scale(0, 0);
             }
 
-            let rect = actor.meta_window.get_frame_rect();
+            let rect = actor.meta_window.get_buffer_rect();
             let [xDest, yDest] = [rect.x, rect.y];
 
             actor.show();


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