diff --git a/js/ui/overlay.js b/js/ui/overlay.js index 894d3c6ba..14e69afe3 100644 --- a/js/ui/overlay.js +++ b/js/ui/overlay.js @@ -92,6 +92,7 @@ Overlay.prototype = { this._group._delegate = this; this.visible = false; + this.animationInProgress = false; this._hideInProgress = false; this._recalculateGridSizes(); @@ -242,6 +243,7 @@ Overlay.prototype = { return; this.visible = true; + this.animationInProgress = true; let global = Shell.Global.get(); let screenWidth = global.screen_width; @@ -309,6 +311,7 @@ Overlay.prototype = { let global = Shell.Global.get(); + this.animationInProgress = true; this._hideInProgress = true; if (this._activeDisplayPane != null) this._activeDisplayPane.close(); @@ -377,6 +380,8 @@ Overlay.prototype = { this._dash.actor.raise_top(); this._dash.actor.remove_clip(); + this.animationInProgress = false; + this.emit('shown'); }, @@ -393,6 +398,7 @@ Overlay.prototype = { this._group.hide(); this.visible = false; + this.animationInProgress = false; this._hideInProgress = false; Main.endModal(); diff --git a/js/ui/panel.js b/js/ui/panel.js index d8ac1ac6e..13d532052 100644 --- a/js/ui/panel.js +++ b/js/ui/panel.js @@ -83,8 +83,7 @@ Panel.prototype = { // In addition to being triggered by the mouse enter event, the hot corner // can be triggered by clicking on it. This is useful if the user wants to - // immediately undo the effect of triggering the hot corner once in the - // hot corner. + // undo the effect of triggering the hot corner once in the hot corner. hotCorner.connect('enter-event', Lang.bind(this, this._onHotCornerTriggered)); hotCorner.connect('button-release-event', @@ -220,7 +219,9 @@ Panel.prototype = { }, _onHotCornerTriggered : function() { - Main.overlay.toggle(); + if (!Main.overlay.animationInProgress) { + Main.overlay.toggle(); + } return false; } };