[gnome-shell] messageTray: Use the BoxPointer APIs for hiding without animating



commit 1ec349f7c95565e633ae9dc30c903608207d4854
Author: Jasper St. Pierre <jstpierre mecheye net>
Date:   Fri Aug 2 00:11:16 2013 -0400

    messageTray: Use the BoxPointer APIs for hiding without animating

 js/ui/messageTray.js |   12 +++---------
 1 files changed, 3 insertions(+), 9 deletions(-)
---
diff --git a/js/ui/messageTray.js b/js/ui/messageTray.js
index 4fae789..c42652f 100644
--- a/js/ui/messageTray.js
+++ b/js/ui/messageTray.js
@@ -2717,15 +2717,9 @@ const MessageTray = new Lang.Class({
             this._sourceDoneDisplayingId = 0;
         }
 
-        if (this._summaryBoxPointerItem.source.notifications.length == 0) {
-            this._summaryBoxPointer.actor.hide();
-            this._hideSummaryBoxPointerCompleted();
-        } else {
-            if (global.stage.key_focus &&
-                !this.actor.contains(global.stage.key_focus))
-                this._setClickedSummaryItem(null);
-            this._summaryBoxPointer.hide(BoxPointer.PopupAnimation.FULL, Lang.bind(this, 
this._hideSummaryBoxPointerCompleted));
-        }
+        let animate = (this._summaryBoxPointerItem.source.notifications.length > 0);
+        this._summaryBoxPointer.hide(animate ? BoxPointer.PopupAnimation.FULL : 
BoxPointer.PopupAnimation.NONE,
+                                     Lang.bind(this, this._hideSummaryBoxPointerCompleted));
     },
 
     _hideSummaryBoxPointer: function() {


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