diff --git a/js/ui/keyboard.js b/js/ui/keyboard.js index 66653d602..441384634 100644 --- a/js/ui/keyboard.js +++ b/js/ui/keyboard.js @@ -924,9 +924,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;