Hide summary box pointer without animating if it is empty
This ensures that we don't show a small black blob fading away when the user clicks on the notification and it is removed. Set HIDING state right away in _hideSummaryBoxPointer() so that it is only called once. Update this._pointerInTray when the tray is unlocked, so that we are not dependent on escapeTray() being triggered by 'done-displaying-content' signal. https://bugzilla.gnome.org/show_bug.cgi?id=645697
This commit is contained in:
parent
9a21008177
commit
659130856c
@ -1417,6 +1417,7 @@ MessageTray.prototype = {
|
|||||||
if (!this._locked)
|
if (!this._locked)
|
||||||
return;
|
return;
|
||||||
this._locked = false;
|
this._locked = false;
|
||||||
|
this._pointerInTray = this.actor.hover && !this._summaryBoxPointer.bin.hover;
|
||||||
this._updateState();
|
this._updateState();
|
||||||
},
|
},
|
||||||
|
|
||||||
@ -2106,13 +2107,18 @@ MessageTray.prototype = {
|
|||||||
},
|
},
|
||||||
|
|
||||||
_hideSummaryBoxPointer: function() {
|
_hideSummaryBoxPointer: function() {
|
||||||
|
this._summaryBoxPointerState = State.HIDING;
|
||||||
// Unset this._clickedSummaryItem if we are no longer showing the summary
|
// Unset this._clickedSummaryItem if we are no longer showing the summary
|
||||||
if (this._summaryState != State.SHOWN)
|
if (this._summaryState != State.SHOWN)
|
||||||
this._unsetClickedSummaryItem();
|
this._unsetClickedSummaryItem();
|
||||||
|
|
||||||
this._focusGrabber.ungrabFocus();
|
this._focusGrabber.ungrabFocus();
|
||||||
this._summaryBoxPointerState = State.HIDING;
|
if (this._summaryBoxPointerItem.source.notifications.length == 0) {
|
||||||
this._summaryBoxPointer.hide(true, Lang.bind(this, this._hideSummaryBoxPointerCompleted));
|
this._summaryBoxPointer.actor.hide();
|
||||||
|
this._hideSummaryBoxPointerCompleted();
|
||||||
|
} else {
|
||||||
|
this._summaryBoxPointer.hide(true, Lang.bind(this, this._hideSummaryBoxPointerCompleted));
|
||||||
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
_hideSummaryBoxPointerCompleted: function() {
|
_hideSummaryBoxPointerCompleted: function() {
|
||||||
|
Loading…
Reference in New Issue
Block a user