[gnome-shell] messageTray: Don't show the context-menu when the tray isn't open



commit 1bce210c516215ceb78a8b37833ab8140476b959
Author: Jasper St. Pierre <jstpierre mecheye net>
Date:   Mon Mar 18 13:49:53 2013 -0400

    messageTray: Don't show the context-menu when the tray isn't open
    
    https://bugzilla.gnome.org/show_bug.cgi?id=697709

 js/ui/messageTray.js | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)
---
diff --git a/js/ui/messageTray.js b/js/ui/messageTray.js
index 14343cb..98724c5 100644
--- a/js/ui/messageTray.js
+++ b/js/ui/messageTray.js
@@ -1721,6 +1721,9 @@ const MessageTray = new Lang.Class({
         this.actor.add_action(clickAction);
 
         clickAction.connect('clicked', Lang.bind(this, function(action) {
+            if (this._trayState != State.SHOWN)
+                return;
+
             let button = action.get_button();
             if (button == 3)
                 this._openContextMenu();
@@ -1731,7 +1734,7 @@ const MessageTray = new Lang.Class({
         clickAction.connect('long-press', Lang.bind(this, function(action, actor, state) {
             switch (state) {
             case Clutter.LongPressState.QUERY:
-                return true;
+                return this._trayState == State.SHOWN;
             case Clutter.LongPressState.ACTIVATE:
                 this._openContextMenu();
             }


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