messageTray: Fix lightbox outside the overview

Commit d0310bd745 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
This commit is contained in:
Florian Müllner 2013-05-27 21:03:46 +02:00
parent 5de5b7a66a
commit 365cda386c

View File

@ -1658,12 +1658,16 @@ const MessageTray = new Lang.Class({
this.clearableCount = 0;
this._lightbox = new Lightbox.Lightbox(Main.layoutManager.overviewGroup,
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() {