[gnome-shell] messageTray: Make sure to always grab focus
- From: Jasper St. Pierre <jstpierre src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-shell] messageTray: Make sure to always grab focus
- Date: Thu, 1 Mar 2012 08:00:15 +0000 (UTC)
commit 7d29e691a4ec3074e8bbb04f0c9bb14f1c03b810
Author: Jasper St. Pierre <jstpierre mecheye net>
Date: Wed Feb 29 19:30:43 2012 -0500
messageTray: Make sure to always grab focus
If a widget isn't focusable or none of its children are focusable, then
navigate_focus will return false and the key focus won't be set. We
need to explicitly grab the key focus in this case.
https://bugzilla.gnome.org/show_bug.cgi?id=671001
js/ui/messageTray.js | 4 +++-
1 files changed, 3 insertions(+), 1 deletions(-)
---
diff --git a/js/ui/messageTray.js b/js/ui/messageTray.js
index f9c275d..0999bcc 100644
--- a/js/ui/messageTray.js
+++ b/js/ui/messageTray.js
@@ -261,7 +261,9 @@ const FocusGrabber = new Lang.Class({
this._hasFocus = true;
- this.actor.navigate_focus(null, Gtk.DirectionType.TAB_FORWARD, false);
+ if (!this.actor.navigate_focus(null, Gtk.DirectionType.TAB_FORWARD, false))
+ this.actor.grab_key_focus();
+
this.emit('focus-grabbed');
},
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]