[gnome-shell] grabHelper: Ignore events from On-Screen-Keyboard
- From: Florian MÃllner <fmuellner src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-shell] grabHelper: Ignore events from On-Screen-Keyboard
- Date: Tue, 25 Sep 2012 06:26:04 +0000 (UTC)
commit 2e6370945071d332d9e946cf5b4dbad993e4cdda
Author: Florian MÃllner <fmuellner gnome org>
Date: Fri Sep 21 16:58:03 2012 +0200
grabHelper: Ignore events from On-Screen-Keyboard
GrabHelper automatically releases grabs when the user clicks outside
the grabbed actors. However at least for the message-tray (which is
the only user of grabHelper at the moment), we must ignore any events
from the On-Screen-Keyboard, to prevent the tray from hiding at every
key press.
https://bugzilla.gnome.org/show_bug.cgi?id=683546
js/ui/grabHelper.js | 3 +++
js/ui/keyboard.js | 6 ++++++
2 files changed, 9 insertions(+), 0 deletions(-)
---
diff --git a/js/ui/grabHelper.js b/js/ui/grabHelper.js
index fccc2fb..8b81b19 100644
--- a/js/ui/grabHelper.js
+++ b/js/ui/grabHelper.js
@@ -318,6 +318,9 @@ const GrabHelper = new Lang.Class({
if (this._isWithinGrabbedActor(event.get_source()))
return false;
+ if (Main.keyboard.shouldTakeEvent(event))
+ return false;
+
if (button) {
// If we have a press event, ignore the next event,
// which should be a release event.
diff --git a/js/ui/keyboard.js b/js/ui/keyboard.js
index 6a4d508..09551dc 100644
--- a/js/ui/keyboard.js
+++ b/js/ui/keyboard.js
@@ -468,6 +468,12 @@ const Keyboard = new Lang.Class({
}
},
+ shouldTakeEvent: function(event) {
+ let actor = event.get_source();
+ return Main.layoutManager.keyboardBox.contains(actor) ||
+ actor._extended_keys || actor.extended_key;
+ },
+
show: function () {
this._redraw();
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]