[gnome-shell/gnome-42] ControlsManagerLayout: Use primaryMonitor



commit d8416baa7b140a75ca0acbc3eab6a10f77d953a1
Author: Ivan Molodetskikh <yalterz gmail com>
Date:   Sat Jul 30 21:40:39 2022 -0700

    ControlsManagerLayout: Use primaryMonitor
    
    ControlsManager already hardcodes primaryMonitor, so do it here too to
    skip an expensive search.
    
    Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/2395>
    (cherry picked from commit c3284eb8ac7e4ede272de5ab7a147c4780f1e3e8)

 js/ui/overviewControls.js | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
---
diff --git a/js/ui/overviewControls.js b/js/ui/overviewControls.js
index 4dd9a979d3..2d58be7bb0 100644
--- a/js/ui/overviewControls.js
+++ b/js/ui/overviewControls.js
@@ -135,7 +135,7 @@ class ControlsManagerLayout extends Clutter.BoxLayout {
 
         const { spacing } = this;
 
-        const monitor = Main.layoutManager.findMonitorForActor(this._container);
+        const monitor = Main.layoutManager.primaryMonitor;
         const workArea = Main.layoutManager.getWorkAreaForMonitor(monitor.index);
         const startX = workArea.x - monitor.x;
         const startY = workArea.y - monitor.y;


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