mirror of
https://github.com/edu4rdshl/gnome-shell.git
synced 2026-07-18 07:34:54 +00:00
keyboard: Handle case where keyboardMonitor is unset
This may be the case where keyboardIndex is -1, which may be the case where either the keyboard monitor hasn't been set yet, or the keyboard is being unmanaged and meta_window_get_monitor returns -1 https://bugzilla.gnome.org/show_bug.cgi?id=788882
This commit is contained in:
parent
c9bf72c5c4
commit
19e864ed3b
1 changed files with 4 additions and 2 deletions
|
|
@ -936,9 +936,11 @@ var Keyboard = new Lang.Class({
|
|||
},
|
||||
|
||||
_relayout() {
|
||||
if (this.actor == null)
|
||||
return;
|
||||
let monitor = Main.layoutManager.keyboardMonitor;
|
||||
|
||||
if (this.actor == null || monitor == null)
|
||||
return;
|
||||
|
||||
let maxHeight = monitor.height / 3;
|
||||
this.actor.width = monitor.width;
|
||||
this.actor.height = maxHeight;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue