[gnome-shell] messageTray: Move focus ourselves when entering by keybinding



commit 6ef3c628e66744f3ce44fb8798b220b61e338960
Author: Florian MÃllner <fmuellner gnome org>
Date:   Sat Sep 15 23:01:56 2012 +0200

    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 files changed, 1 insertions(+), 3 deletions(-)
---
diff --git a/js/ui/messageTray.js b/js/ui/messageTray.js
index 5a2e3d2..30cb6a7 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() {



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]