ui: Improve handling being headless

Don't assume there will always be a primary (logical) monitor, or any
(logical) monitor at all. This includes not allocating / layouting /
styling correctly when being headless.

The initial background loading will also be delayed until there are any
(logical) monitors connected.

https://bugzilla.gnome.org/show_bug.cgi?id=730551
This commit is contained in:
Jonas Ådahl
2017-04-12 14:46:54 +08:00
parent 59fc26f821
commit 5c37facc08
4 changed files with 64 additions and 12 deletions

View File

@ -392,6 +392,9 @@ var Overview = new Lang.Class({
// when it is next shown.
this.hide();
if (!Main.layoutManager.primaryMonitor)
return;
let workArea = Main.layoutManager.getWorkAreaForMonitor(Main.layoutManager.primaryIndex);
this._coverPane.set_position(0, workArea.y);