[gnome-shell] overviewControls: Don't update work area box when headless



commit fe9c2b8df6224bddbe9243269f45e5e91f12cd07
Author: Jonas Ã…dahl <jadahl gmail com>
Date:   Thu Sep 8 12:31:15 2022 +0200

    overviewControls: Don't update work area box when headless
    
    When headless, we don't have a monitor we can derive a size from, so
    don't even try, just let it be updated when we actually have a monitor
    that will show stuff.
    
    Closes: https://gitlab.gnome.org/GNOME/gnome-shell/-/issues/5831
    Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/2478>

 js/ui/overviewControls.js | 3 +++
 1 file changed, 3 insertions(+)
---
diff --git a/js/ui/overviewControls.js b/js/ui/overviewControls.js
index d4dccbddba..fa8202ee88 100644
--- a/js/ui/overviewControls.js
+++ b/js/ui/overviewControls.js
@@ -55,6 +55,9 @@ class ControlsManagerLayout extends Clutter.BoxLayout {
 
     _updateWorkAreaBox() {
         const monitor = Main.layoutManager.primaryMonitor;
+        if (!monitor)
+            return;
+
         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]