messageTray: Use a Lightbox to shade the window_group

This is a visual indication of the fact that a grab is in place.

https://bugzilla.gnome.org/show_bug.cgi?id=681392
This commit is contained in:
Debarshi Ray 2012-08-08 19:51:31 +02:00 committed by Jasper St. Pierre
parent 8f71920622
commit cb5095370e

View File

@ -17,6 +17,7 @@ const BoxPointer = imports.ui.boxpointer;
const CtrlAltTab = imports.ui.ctrlAltTab; const CtrlAltTab = imports.ui.ctrlAltTab;
const GnomeSession = imports.misc.gnomeSession; const GnomeSession = imports.misc.gnomeSession;
const GrabHelper = imports.ui.grabHelper; const GrabHelper = imports.ui.grabHelper;
const Lightbox = imports.ui.lightbox;
const Main = imports.ui.main; const Main = imports.ui.main;
const PopupMenu = imports.ui.popupMenu; const PopupMenu = imports.ui.popupMenu;
const Params = imports.misc.params; const Params = imports.misc.params;
@ -1381,6 +1382,12 @@ const MessageTray = new Lang.Class({
this._inFullscreen = false; this._inFullscreen = false;
this._desktopClone = null; this._desktopClone = null;
this._lightbox = new Lightbox.Lightbox(global.window_group,
{ inhibitEvents: true,
fadeInTime: ANIMATION_TIME,
fadeOutTime: ANIMATION_TIME
});
this._corner = new Clutter.Rectangle({ width: 1, this._corner = new Clutter.Rectangle({ width: 1,
height: 1, height: 1,
opacity: 0, opacity: 0,
@ -1918,6 +1925,8 @@ const MessageTray = new Lang.Class({
this._desktopClone.y = 0; this._desktopClone.y = 0;
this._desktopClone.show(); this._desktopClone.show();
this._lightbox.show();
Tweener.addTween(this._desktopClone, Tweener.addTween(this._desktopClone,
{ y: this._desktopClone.y - this.actor.height, { y: this._desktopClone.y - this.actor.height,
time: ANIMATION_TIME, time: ANIMATION_TIME,
@ -1968,6 +1977,8 @@ const MessageTray = new Lang.Class({
geometry.height + progress); geometry.height + progress);
}) })
}); });
this._lightbox.hide();
}, },
_onIdleMonitorWatch: function(monitor, id, userBecameIdle) { _onIdleMonitorWatch: function(monitor, id, userBecameIdle) {