diff --git a/js/ui/layout.js b/js/ui/layout.js index 381676dc4..4ca2680a9 100644 --- a/js/ui/layout.js +++ b/js/ui/layout.js @@ -976,8 +976,9 @@ const LayoutManager = new Lang.Class({ !metaWindow.appears_focused) metaWindow.minimize(); } - this.emit('primary-fullscreen-changed', this.primaryMonitor.inFullscreen); } + + this.emit('fullscreen-changed'); }, _updateRegions: function() { diff --git a/js/ui/messageTray.js b/js/ui/messageTray.js index 0b1b50253..1f4c555e1 100644 --- a/js/ui/messageTray.js +++ b/js/ui/messageTray.js @@ -1670,7 +1670,7 @@ const MessageTray = new Lang.Class({ Main.layoutManager.trackChrome(this._notificationWidget); 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)); // If the overview shows or hides while we're in @@ -2169,11 +2169,6 @@ const MessageTray = new Lang.Class({ this._updateState(); }, - _onFullscreenChanged: function(obj, state) { - this._inFullscreen = state; - this._updateState(); - }, - _onStatusChanged: function(status) { if (status == GnomeSession.PresenceStatus.BUSY) { // remove notification and allow the summary to be closed now @@ -2232,7 +2227,7 @@ const MessageTray = new Lang.Class({ let notificationQueue = this._notificationQueue; let notificationUrgent = notificationQueue.length > 0 && notificationQueue[0].urgency == Urgency.CRITICAL; 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 nextNotification = notificationQueue.length > 0 ? notificationQueue[0] : null; let notificationPinned = this._pointerInTray && !this._pointerInSummary && !this._notificationRemoved;