[gnome-shell] messageTray: Fix lightbox outside the overview



commit 365cda386c9d3c759904050ebd4653188c3ad197
Author: Florian Müllner <fmuellner gnome org>
Date:   Mon May 27 21:03:46 2013 +0200

    messageTray: Fix lightbox outside the overview
    
    Commit d0310bd745968 blindly replaced global.overlay_group with
    Main.layout.overviewGroup, but unlike the former, the latter is
    hidden while the overview is not active, which makes it unsuitable
    for the message tray's light box. In fact, with the removal of
    global.overlay_group, there is no longer a container which may
    be used both inside and outside the overview, so we can either
    recreate the lightbox each time we show/hide the overview, or
    use different lightboxes altogether; this opts for the latter.
    
    https://bugzilla.gnome.org/show_bug.cgi?id=701097

 js/ui/messageTray.js |   22 ++++++++++++++--------
 1 files changed, 14 insertions(+), 8 deletions(-)
---
diff --git a/js/ui/messageTray.js b/js/ui/messageTray.js
index efba34b..c056924 100644
--- a/js/ui/messageTray.js
+++ b/js/ui/messageTray.js
@@ -1658,12 +1658,16 @@ const MessageTray = new Lang.Class({
 
         this.clearableCount = 0;
 
-        this._lightbox = new Lightbox.Lightbox(Main.layoutManager.overviewGroup,
-                                               { inhibitEvents: true,
-                                                 fadeInTime: ANIMATION_TIME,
-                                                 fadeOutTime: ANIMATION_TIME,
-                                                 fadeFactor: 0.2
-                                               });
+        this._lightboxes = [];
+        let lightboxContainers = [global.window_group,
+                                  Main.layoutManager.overviewGroup];
+        for (let i = 0; i < lightboxContainers.length; i++)
+            this._lightboxes.push(new Lightbox.Lightbox(lightboxContainers[i],
+                                                        { inhibitEvents: true,
+                                                          fadeInTime: ANIMATION_TIME,
+                                                          fadeOutTime: ANIMATION_TIME,
+                                                          fadeFactor: 0.2
+                                                        }));
 
         Main.layoutManager.trayBox.add_actor(this.actor);
         Main.layoutManager.trayBox.add_actor(this._notificationWidget);
@@ -2325,7 +2329,8 @@ const MessageTray = new Lang.Class({
                       transition: 'easeOutQuad'
                     });
 
-        this._lightbox.show();
+        for (let i = 0; i < this._lightboxes.length; i++)
+            this._lightboxes[i].show();
 
         return true;
     },
@@ -2380,7 +2385,8 @@ const MessageTray = new Lang.Class({
         // which would happen if GrabHelper ungrabbed for us.
         // This is a no-op in that case.
         this._grabHelper.ungrab({ actor: this.actor });
-        this._lightbox.hide();
+        for (let i = 0; i < this._lightboxes.length; i++)
+            this._lightboxes[i].hide();
     },
 
     _hideDesktopClone: function() {


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