messageTray: Use the bottom monitor's fullscreen state for rate limiting
It makes more sense to use the monitor the tray is on, rather than the primary monitor. This also matches us with whether we can open the tray from a barrier/dwell or not. https://bugzilla.gnome.org/show_bug.cgi?id=695659
This commit is contained in:
parent
78dacfa865
commit
725a36e37a
@ -976,8 +976,9 @@ const LayoutManager = new Lang.Class({
|
|||||||
!metaWindow.appears_focused)
|
!metaWindow.appears_focused)
|
||||||
metaWindow.minimize();
|
metaWindow.minimize();
|
||||||
}
|
}
|
||||||
this.emit('primary-fullscreen-changed', this.primaryMonitor.inFullscreen);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
this.emit('fullscreen-changed');
|
||||||
},
|
},
|
||||||
|
|
||||||
_updateRegions: function() {
|
_updateRegions: function() {
|
||||||
|
@ -1670,7 +1670,7 @@ const MessageTray = new Lang.Class({
|
|||||||
Main.layoutManager.trackChrome(this._notificationWidget);
|
Main.layoutManager.trackChrome(this._notificationWidget);
|
||||||
Main.layoutManager.trackChrome(this._closeButton);
|
Main.layoutManager.trackChrome(this._closeButton);
|
||||||
|
|
||||||
Main.layoutManager.connect('primary-fullscreen-changed', Lang.bind(this, this._onFullscreenChanged));
|
Main.layoutManager.connect('fullscreen-changed', Lang.bind(this, this._updateState));
|
||||||
Main.layoutManager.connect('hot-corners-changed', Lang.bind(this, this._hotCornersChanged));
|
Main.layoutManager.connect('hot-corners-changed', Lang.bind(this, this._hotCornersChanged));
|
||||||
|
|
||||||
// If the overview shows or hides while we're in
|
// If the overview shows or hides while we're in
|
||||||
@ -2169,11 +2169,6 @@ const MessageTray = new Lang.Class({
|
|||||||
this._updateState();
|
this._updateState();
|
||||||
},
|
},
|
||||||
|
|
||||||
_onFullscreenChanged: function(obj, state) {
|
|
||||||
this._inFullscreen = state;
|
|
||||||
this._updateState();
|
|
||||||
},
|
|
||||||
|
|
||||||
_onStatusChanged: function(status) {
|
_onStatusChanged: function(status) {
|
||||||
if (status == GnomeSession.PresenceStatus.BUSY) {
|
if (status == GnomeSession.PresenceStatus.BUSY) {
|
||||||
// remove notification and allow the summary to be closed now
|
// remove notification and allow the summary to be closed now
|
||||||
@ -2232,7 +2227,7 @@ const MessageTray = new Lang.Class({
|
|||||||
let notificationQueue = this._notificationQueue;
|
let notificationQueue = this._notificationQueue;
|
||||||
let notificationUrgent = notificationQueue.length > 0 && notificationQueue[0].urgency == Urgency.CRITICAL;
|
let notificationUrgent = notificationQueue.length > 0 && notificationQueue[0].urgency == Urgency.CRITICAL;
|
||||||
let notificationForFeedback = notificationQueue.length > 0 && notificationQueue[0].forFeedback;
|
let notificationForFeedback = notificationQueue.length > 0 && notificationQueue[0].forFeedback;
|
||||||
let notificationsLimited = this._busy || this._inFullscreen;
|
let notificationsLimited = this._busy || Main.layoutManager.bottomMonitor.inFullscreen;
|
||||||
let notificationsPending = notificationQueue.length > 0 && (!notificationsLimited || notificationUrgent || notificationForFeedback) && Main.sessionMode.hasNotifications;
|
let notificationsPending = notificationQueue.length > 0 && (!notificationsLimited || notificationUrgent || notificationForFeedback) && Main.sessionMode.hasNotifications;
|
||||||
let nextNotification = notificationQueue.length > 0 ? notificationQueue[0] : null;
|
let nextNotification = notificationQueue.length > 0 ? notificationQueue[0] : null;
|
||||||
let notificationPinned = this._pointerInTray && !this._pointerInSummary && !this._notificationRemoved;
|
let notificationPinned = this._pointerInTray && !this._pointerInSummary && !this._notificationRemoved;
|
||||||
|
Loading…
Reference in New Issue
Block a user