From 6ef3c628e66744f3ce44fb8798b220b61e338960 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Florian=20M=C3=BCllner?= Date: Sat, 15 Sep 2012 23:01:56 +0200 Subject: [PATCH] messageTray: Move focus ourselves when entering by keybinding When the tray is triggered by keybinding rather than dwelling, the first summary item should be given key focus. Currently this is achieved by grabbing the focus before toggling the tray, so that the grabHelper will move the focus for us. However this interferes with the grabHelper's focus save/restore mechanism - for instance, after using the keybinding once, the tray will always come up with the first item focused. https://bugzilla.gnome.org/show_bug.cgi?id=682243 --- js/ui/messageTray.js | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/js/ui/messageTray.js b/js/ui/messageTray.js index 5a2e3d266..30cb6a7e6 100644 --- a/js/ui/messageTray.js +++ b/js/ui/messageTray.js @@ -1715,10 +1715,8 @@ const MessageTray = new Lang.Class({ }, toggleAndNavigate: function() { - // Grab the key focus so that GrabHelper knows - // that we have the key grab. - this._summary.grab_key_focus(); this.toggle(); + this._summary.navigate_focus(null, Gtk.DirectionType.TAB_FORWARD, false); }, hide: function() {