[gnome-shell] messageTray: Hide notifications when the tray is summoned
- From: Jasper St. Pierre <jstpierre src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-shell] messageTray: Hide notifications when the tray is summoned
- Date: Mon, 20 May 2013 18:26:18 +0000 (UTC)
commit d5f95db68d566f882c4d984e03780a573425ea6c
Author: Jasper St. Pierre <jstpierre mecheye net>
Date: Mon May 20 14:05:59 2013 -0400
messageTray: Hide notifications when the tray is summoned
If the user summons the tray, it should take priority over a
notification showing.
https://bugzilla.gnome.org/show_bug.cgi?id=700639
js/ui/messageTray.js | 10 +++++-----
1 files changed, 5 insertions(+), 5 deletions(-)
---
diff --git a/js/ui/messageTray.js b/js/ui/messageTray.js
index 28eef92..fb3623e 100644
--- a/js/ui/messageTray.js
+++ b/js/ui/messageTray.js
@@ -2218,8 +2218,10 @@ const MessageTray = new Lang.Class({
!(this._notification && this._notification.focused) &&
!this._pointerInNotification;
let notificationLockedOut = !hasNotifications && this._notification;
- let notificationMustClose = this._notificationRemoved || notificationLockedOut ||
(notificationExpired && this._userActiveWhileNotificationShown) || this._notificationClosed;
- let canShowNotification = notificationsPending && this._trayState == State.HIDDEN;
+ let notificationMustClose = (this._notificationRemoved || notificationLockedOut ||
+ (notificationExpired && this._userActiveWhileNotificationShown) ||
+ this._notificationClosed || this._traySummoned);
+ let canShowNotification = notificationsPending && this._trayState == State.HIDDEN &&
!this._traySummoned;
if (this._notificationState == State.HIDDEN) {
if (canShowNotification)
@@ -2233,8 +2235,6 @@ const MessageTray = new Lang.Class({
this._ensureNotificationFocused();
}
- let mustHideTray = this._notificationState != State.HIDDEN || !hasNotifications;
-
// Summary notification
let haveClickedSummaryItem = this._clickedSummaryItem != null;
let summarySourceIsMainNotificationSource = (haveClickedSummaryItem && this._notification &&
@@ -2264,7 +2264,7 @@ const MessageTray = new Lang.Class({
// Tray itself
let trayIsVisible = (this._trayState == State.SHOWING ||
this._trayState == State.SHOWN);
- let trayShouldBeVisible = this._traySummoned && !this._keyboardVisible && !mustHideTray;
+ let trayShouldBeVisible = this._traySummoned && !this._keyboardVisible && hasNotifications;
if (!trayIsVisible && trayShouldBeVisible)
trayShouldBeVisible = this._showTray();
else if (trayIsVisible && !trayShouldBeVisible)
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]