[gnome-shell] Don't show right click menu if a new notification for the source is showing



commit bb7388a7fe376a4162b8ccac20f3aba9a52757a5
Author: Marina Zhurakhinskaya <marinaz redhat com>
Date:   Mon Mar 7 14:03:14 2011 -0500

    Don't show right click menu if a new notification for the source is showing
    
    Showing the right click menu causes errors when ungrabbing focus in this case.
    It will soon be impossible to get to the right click menu anyway when a new
    notification is showing, because we are never going to show the summary
    and the new notification at the same time.

 js/ui/messageTray.js |    6 +++---
 1 files changed, 3 insertions(+), 3 deletions(-)
---
diff --git a/js/ui/messageTray.js b/js/ui/messageTray.js
index 29d882c..c9c977a 100644
--- a/js/ui/messageTray.js
+++ b/js/ui/messageTray.js
@@ -1574,8 +1574,8 @@ MessageTray.prototype = {
 
         // Summary notification
         let haveClickedSummaryItem = this._clickedSummaryItem != null;
-        let summaryNotificationIsMainNotification = (haveClickedSummaryItem &&
-                                                     this._clickedSummaryItem.source.notification == this._notification);
+        let summarySourceIsMainNotificationSource = (haveClickedSummaryItem && this._notification &&
+                                                     this._clickedSummaryItem.source == this._notification.source);
         let canShowSummaryBoxPointer = this._summaryState == State.SHOWN;
         let wrongSummaryNotification = (this._clickedSummaryItemMouseButton == 1 &&
                                         this._summaryNotification != this._clickedSummaryItem.source.notification);
@@ -1585,7 +1585,7 @@ MessageTray.prototype = {
                                       (wrongSummaryNotification || wrongSummaryRightClickMenu));
 
         if (this._summaryBoxPointerState == State.HIDDEN) {
-            if (haveClickedSummaryItem && !summaryNotificationIsMainNotification && canShowSummaryBoxPointer)
+            if (haveClickedSummaryItem && !summarySourceIsMainNotificationSource && canShowSummaryBoxPointer)
                 this._showSummaryBoxPointer();
         } else if (this._summaryBoxPointerState == State.SHOWN) {
             if (!haveClickedSummaryItem || !canShowSummaryBoxPointer || wrongSummaryBoxPointer)



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]