[gnome-shell] keyboard: Ignore focus changes caused by tray showing/hiding
- From: Florian MÃllner <fmuellner src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-shell] keyboard: Ignore focus changes caused by tray showing/hiding
- Date: Tue, 25 Sep 2012 06:26:14 +0000 (UTC)
commit 6c1bd95643d855e10aacb7428e85823aafc0f750
Author: Florian MÃllner <fmuellner gnome org>
Date: Mon Sep 24 17:02:13 2012 +0200
keyboard: Ignore focus changes caused by tray showing/hiding
The keyboard is shown/hidden automatically when (un)focusing a
ClutterText actor. This behavior breaks with the message tray now
grabbing/releasing key focus when toggled. Fix this by ignoring
all focus changes to or from the message tray.
https://bugzilla.gnome.org/show_bug.cgi?id=683546
js/ui/keyboard.js | 7 +++++++
1 files changed, 7 insertions(+), 0 deletions(-)
---
diff --git a/js/ui/keyboard.js b/js/ui/keyboard.js
index 723f89a..5d62a7e 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);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]