[gnome-shell] workspace: Grab the key focus when hovering over a window



commit aeb9f5775f66858de508ac4429cfb48553672c89
Author: Jasper St. Pierre <jstpierre mecheye net>
Date:   Mon Nov 4 17:25:18 2013 -0500

    workspace: Grab the key focus when hovering over a window
    
    This is simply an experiment. I'm not sure I like the result, but it was
    worth trying out regardless.
    
    https://bugzilla.gnome.org/show_bug.cgi?id=644306

 js/ui/workspace.js |    5 +++++
 1 files changed, 5 insertions(+), 0 deletions(-)
---
diff --git a/js/ui/workspace.js b/js/ui/workspace.js
index d1abc22..34090de 100644
--- a/js/ui/workspace.js
+++ b/js/ui/workspace.js
@@ -89,6 +89,7 @@ const WindowClone = new Lang.Class({
         this.actor.add_action(clickAction);
         this.actor.connect('destroy', Lang.bind(this, this._onDestroy));
         this.actor.connect('key-press-event', Lang.bind(this, this._onKeyPress));
+        this.actor.connect('enter-event', Lang.bind(this, this._onEnter));
 
         this._draggable = DND.makeDraggable(this.actor,
                                             { restoreOnSuccess: true,
@@ -213,6 +214,10 @@ const WindowClone = new Lang.Class({
         return false;
     },
 
+    _onEnter: function() {
+        this.actor.grab_key_focus();
+    },
+
     _onClicked: function(action, actor) {
         this._activate();
     },


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