diff --git a/js/ui/keyboard.js b/js/ui/keyboard.js index e13c7b724..96da88781 100644 --- a/js/ui/keyboard.js +++ b/js/ui/keyboard.js @@ -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;