diff --git a/js/ui/keyboard.js b/js/ui/keyboard.js index 723f89a2e..5d62a7ef0 100644 --- a/js/ui/keyboard.js +++ b/js/ui/keyboard.js @@ -200,6 +200,7 @@ const Keyboard = new Lang.Class({ this._impl.export(Gio.DBus.session, '/org/gnome/Caribou/Keyboard'); this.actor = null; + this._focusInTray = false; this._timestamp = global.display.get_current_time_roundtrip(); Main.layoutManager.connect('monitors-changed', Lang.bind(this, this._redraw)); @@ -291,6 +292,12 @@ const Keyboard = new Lang.Class({ if (focus && (focus._extended_keys || (focus._key && focus._key.extended_key))) return; + // Ignore focus changes caused by message tray showing/hiding + let trayWasFocused = this._focusInTray; + this._focusInTray = (focus && Main.messageTray.actor.contains(focus)); + if (this._focusInTray || trayWasFocused) + return; + let time = global.get_current_time(); if (focus instanceof Clutter.Text) this.Show(time);