summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJonas Ådahl <jadahl@gmail.com>2017-10-07 00:26:24 (GMT)
committerJonas Ådahl <jadahl@gmail.com>2017-10-07 04:38:16 (GMT)
commit5f8a5114833d7d31d4bd64affbd323bb7252c3d0 (patch)
tree87b3bc0d88a211d0875a3d3e565c15ed9cdd0535
parentf036786d4a0e95086929f3f6f32b87f14d102105 (diff)
downloadgnome-shell-5f8a5114833d7d31d4bd64affbd323bb7252c3d0.zip
gnome-shell-5f8a5114833d7d31d4bd64affbd323bb7252c3d0.tar.xz
layout: Unset primary and bottom monitor when headless
We were handling being initially headless by only setting the primary and bottom monitor if there was any primary monitor, then checking the primary monitor reference before making calls assuming there was any monitors. What we didn't do was unset the primary and bottom monitor when going headless, meaning that temporarly disconnecting a monitor while having windows open caused an assert to be triggered due to various code paths taking the path assuming there are valid monitors. Unsetting both the primary and bottom monitor when going headless avoids the code paths in the same way as they were avoided when starting headless. https://bugzilla.gnome.org/show_bug.cgi?id=788607
-rw-r--r--js/ui/layout.js3
1 files changed, 3 insertions, 0 deletions
diff --git a/js/ui/layout.js b/js/ui/layout.js
index 304c2a1..2f18947 100644
--- a/js/ui/layout.js
+++ b/js/ui/layout.js
@@ -351,6 +351,9 @@ var LayoutManager = new Lang.Class({
this._loadBackground();
this._pendingLoadBackground = false;
}
+ } else {
+ this.primaryMonitor = null;
+ this.bottomMonitor = null;
}
},