1
1717170From 5f8a5114833d7d31d4bd64affbd323bb7252c3d0 Mon Sep 17 00:00:00 2001
2
From: =?UTF-8?q?Jonas=20=C3=85dahl?= <jadahl@gmail.com>
3
Date: Fri, 6 Oct 2017 20:26:24 -0400
4
Subject: layout: Unset primary and bottom monitor when headless
6
We were handling being initially headless by only setting the primary
7
and bottom monitor if there was any primary monitor, then checking the
8
primary monitor reference before making calls assuming there was any
11
What we didn't do was unset the primary and bottom monitor when going
12
headless, meaning that temporarly disconnecting a monitor while having
13
windows open caused an assert to be triggered due to various code paths
14
taking the path assuming there are valid monitors.
16
Unsetting both the primary and bottom monitor when going headless avoids
17
the code paths in the same way as they were avoided when starting
20
https://bugzilla.gnome.org/show_bug.cgi?id=788607
22
js/ui/layout.js | 3 +++
23
1 file changed, 3 insertions(+)
25
diff --git a/js/ui/layout.js b/js/ui/layout.js
26
index 304c2a1..2f18947 100644
29
@@ -351,6 +351,9 @@ var LayoutManager = new Lang.Class({
30
this._loadBackground();
31
this._pendingLoadBackground = false;
34
+ this.primaryMonitor = null;
35
+ this.bottomMonitor = null;