From fe9c2b8df6224bddbe9243269f45e5e91f12cd07 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jonas=20=C3=85dahl?= Date: Thu, 8 Sep 2022 12:31:15 +0200 Subject: [PATCH] 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: --- js/ui/overviewControls.js | 3 +++ 1 file changed, 3 insertions(+) diff --git a/js/ui/overviewControls.js b/js/ui/overviewControls.js index d4dccbddb..fa8202ee8 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;