From 63f137a0ef82fb3d4a5a69d9db24b0052c47502d Mon Sep 17 00:00:00 2001 From: Cosimo Cecchi Date: Wed, 22 Jul 2015 13:07:48 -0700 Subject: [PATCH] mainWindow: listen to motion notify signals on the window Instead of the stage. This fixes the events being sometimes eaten, e.g. with the GtkSourceView viewer. --- src/js/ui/mainWindow.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/js/ui/mainWindow.js b/src/js/ui/mainWindow.js index f7bb582..0037ce3 100644 --- a/src/js/ui/mainWindow.js +++ b/src/js/ui/mainWindow.js @@ -114,11 +114,11 @@ const MainWindow = new Lang.Class({ this._gtkWindow.connect('key-press-event', Lang.bind(this, this._onKeyPressEvent)); + this._gtkWindow.connect('motion-notify-event', + Lang.bind(this, this._onMotionNotifyEvent)); this._stage.connect('button-press-event', Lang.bind(this, this._onButtonPressEvent)); - this._stage.connect('motion-event', - Lang.bind(this, this._onMotionEvent)); }, _createSolidBackground: function() { @@ -199,7 +199,7 @@ const MainWindow = new Lang.Class({ return false; }, - _onMotionEvent : function() { + _onMotionNotifyEvent : function() { if (this._toolbarActor) this._resetToolbar(); -- 2.5.0