messageTray: Be able to "switch" notifications

If you click on a summary item while another is up, we should
swap without an extra click.
This commit is contained in:
Jasper St. Pierre 2012-08-16 13:39:34 -04:00
parent 7a6b2abfeb
commit 1fd17b5027

View File

@ -1633,10 +1633,8 @@ const MessageTray = new Lang.Class({
_onSummaryItemClicked: function(summaryItem, button) {
if (summaryItem.source.handleSummaryClick()) {
this._setClickedSummaryItem(null);
} else if (!this._clickedSummaryItem) {
this._setClickedSummaryItem(summaryItem, button);
} else {
this._setClickedSummaryItem(null);
this._setClickedSummaryItem(summaryItem, button);
}
this._updateState();
@ -2277,9 +2275,11 @@ const MessageTray = new Lang.Class({
_onSummaryBoxPointerUngrabbed: function() {
this._summaryBoxPointerState = State.HIDING;
this._setClickedSummaryItem(null);
this._unlock();
if (this._summaryBoxPointerItem == this._clickedSummaryItem)
this._setClickedSummaryItem(null);
if (this._summaryBoxPointerItem.source.notifications.length == 0) {
this._summaryBoxPointer.actor.hide();
this._hideSummaryBoxPointerCompleted();