From aeb9f5775f66858de508ac4429cfb48553672c89 Mon Sep 17 00:00:00 2001 From: "Jasper St. Pierre" Date: Mon, 4 Nov 2013 17:25:18 -0500 Subject: [PATCH] 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 file changed, 5 insertions(+) diff --git a/js/ui/workspace.js b/js/ui/workspace.js index d1abc225e..34090de3e 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(); },