[gnome-shell] messageTray: Fix _hideTray() being called recursively



commit afcd90ae27b50487a5b6f43339844bf495852910
Author: Florian MÃllner <fmuellner gnome org>
Date:   Fri Sep 14 19:23:21 2012 +0200

    messageTray: Fix _hideTray() being called recursively
    
    _hideTray() is called by _updateState() when the tray is visible
    but should be hidden; however, _updateState() may be called again
    from within _hideTray() when releasing the GrabHelper grab, so
    unless we update the _trayState variable before that, _hideTray()
    will be called a second time.
    
    https://bugzilla.gnome.org/show_bug.cgi?id=682243

 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 21687ee..f91a010 100644
--- a/js/ui/messageTray.js
+++ b/js/ui/messageTray.js
@@ -2071,17 +2071,17 @@ const MessageTray = new Lang.Class({
     },
 
     _hideTray: function() {
-        // Note that we might have entered here without a grab,
-        // which would happen if GrabHelper ungrabbed for us.
-        // This is a no-op in that case.
-        this._grabHelper.ungrab({ actor: this.actor });
-
         this._tween(this.actor, '_trayState', State.HIDDEN,
                     { y: 0,
                       time: ANIMATION_TIME,
                       transition: 'easeOutQuad'
                     });
 
+        // Note that we might have entered here without a grab,
+        // which would happen if GrabHelper ungrabbed for us.
+        // This is a no-op in that case.
+        this._grabHelper.ungrab({ actor: this.actor });
+
         // If we are coming back from the overview, there are no windows
         // to be moved. Just remove the tray from the ctrl+alt+tab list.
         if (!this._desktopClone) {



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