messageTray: move the summary notification out of MessageTray.actor
With the old pre-boxpointer summary notifications, it sort of made sense that the summary notification actor was a child of the message tray. But there's no reason for that now, and in fact, it ends up requiring special cases in some places since hovering over the summary notification counts as hovering over the tray. So, fix this. https://bugzilla.gnome.org/show_bug.cgi?id=655813
This commit is contained in:
parent
fde200d084
commit
446910cb10
@ -1045,6 +1045,7 @@ StTooltip StLabel {
|
|||||||
-arrow-border-color: #a5a5a5;
|
-arrow-border-color: #a5a5a5;
|
||||||
-arrow-base: 24px;
|
-arrow-base: 24px;
|
||||||
-arrow-rise: 11px;
|
-arrow-rise: 11px;
|
||||||
|
color: white;
|
||||||
}
|
}
|
||||||
|
|
||||||
.summary-boxpointer #notification {
|
.summary-boxpointer #notification {
|
||||||
|
@ -1275,12 +1275,11 @@ MessageTray.prototype = {
|
|||||||
this._summaryMotionId = 0;
|
this._summaryMotionId = 0;
|
||||||
|
|
||||||
this._summaryBoxPointer = new BoxPointer.BoxPointer(St.Side.BOTTOM,
|
this._summaryBoxPointer = new BoxPointer.BoxPointer(St.Side.BOTTOM,
|
||||||
{ reactive: true,
|
{ reactive: true,
|
||||||
track_hover: true });
|
track_hover: true });
|
||||||
this._summaryBoxPointer.actor.style_class = 'summary-boxpointer';
|
this._summaryBoxPointer.actor.style_class = 'summary-boxpointer';
|
||||||
this.actor.add_actor(this._summaryBoxPointer.actor);
|
|
||||||
this._summaryBoxPointer.actor.lower_bottom();
|
|
||||||
this._summaryBoxPointer.actor.hide();
|
this._summaryBoxPointer.actor.hide();
|
||||||
|
Main.chrome.addActor(this._summaryBoxPointer.actor, { visibleInFullscreen: true });
|
||||||
|
|
||||||
this._summaryBoxPointerItem = null;
|
this._summaryBoxPointerItem = null;
|
||||||
this._summaryBoxPointerContentUpdatedId = 0;
|
this._summaryBoxPointerContentUpdatedId = 0;
|
||||||
@ -1332,7 +1331,6 @@ MessageTray.prototype = {
|
|||||||
|
|
||||||
Main.chrome.addActor(this.actor, { visibleInFullscreen: true });
|
Main.chrome.addActor(this.actor, { visibleInFullscreen: true });
|
||||||
Main.chrome.trackActor(this._notificationBin);
|
Main.chrome.trackActor(this._notificationBin);
|
||||||
Main.chrome.trackActor(this._summaryBoxPointer.actor);
|
|
||||||
|
|
||||||
Main.layoutManager.connect('monitors-changed', Lang.bind(this, this._setSizePosition));
|
Main.layoutManager.connect('monitors-changed', Lang.bind(this, this._setSizePosition));
|
||||||
|
|
||||||
@ -1532,7 +1530,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._pointerInTray = this.actor.hover;
|
||||||
this._updateState();
|
this._updateState();
|
||||||
},
|
},
|
||||||
|
|
||||||
@ -1720,13 +1718,6 @@ MessageTray.prototype = {
|
|||||||
if (this._useLongerTrayLeftTimeout && !this._trayLeftTimeoutId)
|
if (this._useLongerTrayLeftTimeout && !this._trayLeftTimeoutId)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
// Don't do anything if the mouse is over the summary notification as this should be considered as
|
|
||||||
// leaving the tray. The tray is locked when the summary notification is visible anyway, but we
|
|
||||||
// should treat the mouse being over the summary notification as the tray being left for collapsing
|
|
||||||
// any expanded summary item other than the one related to the notification.
|
|
||||||
if (this._summaryBoxPointer.bin.hover)
|
|
||||||
return;
|
|
||||||
|
|
||||||
this._useLongerTrayLeftTimeout = false;
|
this._useLongerTrayLeftTimeout = false;
|
||||||
if (this._trayLeftTimeoutId) {
|
if (this._trayLeftTimeoutId) {
|
||||||
Mainloop.source_remove(this._trayLeftTimeoutId);
|
Mainloop.source_remove(this._trayLeftTimeoutId);
|
||||||
|
Loading…
Reference in New Issue
Block a user