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>
This commit is contained in:
Ivan Molodetskikh 2022-07-30 21:40:39 -07:00 committed by Marge Bot
parent 3129633e06
commit c3284eb8ac

View File

@ -135,7 +135,7 @@ class ControlsManagerLayout extends Clutter.BoxLayout {
const { spacing } = this; const { spacing } = this;
const monitor = Main.layoutManager.findMonitorForActor(this._container); const monitor = Main.layoutManager.primaryMonitor;
const workArea = Main.layoutManager.getWorkAreaForMonitor(monitor.index); const workArea = Main.layoutManager.getWorkAreaForMonitor(monitor.index);
const startX = workArea.x - monitor.x; const startX = workArea.x - monitor.x;
const startY = workArea.y - monitor.y; const startY = workArea.y - monitor.y;