Ignore clicks on hot corner during transition
It's both intuitive to go to the corner of the screen and click the activities button at the same time. Both actions bring up the overlay, but combined they cancel each other out. This commit makes clicking the hot corner not cancel the act of going to the hot corner. Based on a patch from Ray Strode.
This commit is contained in:
parent
df8f727bba
commit
00cc32d95a
@ -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();
|
||||
|
@ -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() {
|
||||
if (!Main.overlay.animationInProgress) {
|
||||
Main.overlay.toggle();
|
||||
}
|
||||
return false;
|
||||
}
|
||||
};
|
||||
|
Loading…
Reference in New Issue
Block a user