messageTray: Close the current box pointer when clicking on the same item
This commit is contained in:
parent
95b9863a70
commit
44b4741e35
@ -1640,7 +1640,8 @@ const MessageTray = new Lang.Class({
|
|||||||
if (summaryItem.source.handleSummaryClick()) {
|
if (summaryItem.source.handleSummaryClick()) {
|
||||||
this._setClickedSummaryItem(null);
|
this._setClickedSummaryItem(null);
|
||||||
} else {
|
} else {
|
||||||
this._setClickedSummaryItem(summaryItem, button);
|
if (!this._setClickedSummaryItem(summaryItem, button))
|
||||||
|
this._setClickedSummaryItem(null);
|
||||||
}
|
}
|
||||||
|
|
||||||
this._updateState();
|
this._updateState();
|
||||||
@ -2251,7 +2252,7 @@ const MessageTray = new Lang.Class({
|
|||||||
_setClickedSummaryItem: function(item, button) {
|
_setClickedSummaryItem: function(item, button) {
|
||||||
if (item == this._clickedSummaryItem &&
|
if (item == this._clickedSummaryItem &&
|
||||||
button == this._clickedSummaryItemMouseButton)
|
button == this._clickedSummaryItemMouseButton)
|
||||||
return;
|
return false;
|
||||||
|
|
||||||
if (this._clickedSummaryItem) {
|
if (this._clickedSummaryItem) {
|
||||||
this._clickedSummaryItem.actor.remove_style_pseudo_class('selected');
|
this._clickedSummaryItem.actor.remove_style_pseudo_class('selected');
|
||||||
@ -2278,6 +2279,8 @@ const MessageTray = new Lang.Class({
|
|||||||
this._trayMotionId = Main.layoutManager.trayBox.connect('notify::anchor-y',
|
this._trayMotionId = Main.layoutManager.trayBox.connect('notify::anchor-y',
|
||||||
Lang.bind(this, this._adjustSummaryBoxPointerPosition));
|
Lang.bind(this, this._adjustSummaryBoxPointerPosition));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
return true;
|
||||||
},
|
},
|
||||||
|
|
||||||
_onSummaryBoxPointerUngrabbed: function() {
|
_onSummaryBoxPointerUngrabbed: function() {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user