From 7d29e691a4ec3074e8bbb04f0c9bb14f1c03b810 Mon Sep 17 00:00:00 2001 From: "Jasper St. Pierre" Date: Wed, 29 Feb 2012 19:30:43 -0500 Subject: [PATCH] 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 file changed, 3 insertions(+), 1 deletion(-) diff --git a/js/ui/messageTray.js b/js/ui/messageTray.js index f9c275d29..0999bcc28 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'); },