diff --git a/js/ui/boxpointer.js b/js/ui/boxpointer.js index 8f93b0d8a..05356516c 100644 --- a/js/ui/boxpointer.js +++ b/js/ui/boxpointer.js @@ -45,6 +45,21 @@ const BoxPointer = new Lang.Class({ this._xPosition = 0; this._yPosition = 0; this._sourceAlignment = 0.5; + this._capturedEventId = 0; + this._muteInput(); + }, + + _muteInput: function() { + if (this._capturedEventId == 0) + this._capturedEventId = this.actor.connect('captured-event', + function() { return true; }); + }, + + _unmuteInput: function() { + if (this._capturedEventId != 0) { + this.actor.disconnect(this._capturedEventId); + this._capturedEventId = 0; + } }, show: function(animate, onComplete) { @@ -75,7 +90,11 @@ const BoxPointer = new Lang.Class({ xOffset: 0, yOffset: 0, transition: 'linear', - onComplete: onComplete, + onComplete: Lang.bind(this, function() { + this._unmuteInput(); + if (onComplete) + onComplete(); + }), time: POPUP_ANIMATION_TIME }); }, @@ -102,6 +121,8 @@ const BoxPointer = new Lang.Class({ } } + this._muteInput(); + Tweener.addTween(this, { opacity: 0, xOffset: xOffset, yOffset: yOffset,