panel: fix app menu visibility after quick overview visit
If you left the overview immediately after entering it (either intentionally or due to a bug), the app menu would mistakenly end up hidden due to flaky interaction between its show() and hide() methods. Based on a patch by Dan Winship <danw@gnome.org> https://bugzilla.gnome.org/show_bug.cgi?id=641117
This commit is contained in:
parent
0ef3f999d2
commit
43961aaca5
@ -220,7 +220,7 @@ AppMenuButton.prototype = {
|
||||
|
||||
this._visible = !Main.overview.visible;
|
||||
if (!this._visible)
|
||||
this.hide();
|
||||
this.actor.hide();
|
||||
Main.overview.connect('hiding', Lang.bind(this, function () {
|
||||
this.show();
|
||||
}));
|
||||
@ -255,28 +255,27 @@ AppMenuButton.prototype = {
|
||||
if (this._visible)
|
||||
return;
|
||||
|
||||
this._visible = true;
|
||||
this.actor.show();
|
||||
Tweener.removeTweens(this.actor);
|
||||
Tweener.addTween(this.actor,
|
||||
{ opacity: 255,
|
||||
time: Overview.ANIMATION_TIME,
|
||||
transition: 'easeOutQuad',
|
||||
onComplete: function() {
|
||||
this._visible = true;
|
||||
},
|
||||
onCompleteScope: this });
|
||||
transition: 'easeOutQuad' });
|
||||
},
|
||||
|
||||
hide: function() {
|
||||
if (!this._visible)
|
||||
return;
|
||||
|
||||
this._visible = false;
|
||||
Tweener.removeTweens(this.actor);
|
||||
Tweener.addTween(this.actor,
|
||||
{ opacity: 0,
|
||||
time: Overview.ANIMATION_TIME,
|
||||
transition: 'easeOutQuad',
|
||||
onComplete: function() {
|
||||
this.actor.hide();
|
||||
this._visible = false;
|
||||
},
|
||||
onCompleteScope: this });
|
||||
},
|
||||
|
Loading…
Reference in New Issue
Block a user