[gnome-shell/wip/message-tray] messageTray: Fix vertically stacked monitors
- From: Debarshi Ray <debarshir src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-shell/wip/message-tray] messageTray: Fix vertically stacked monitors
- Date: Tue, 7 Aug 2012 14:00:32 +0000 (UTC)
commit 04b988fa501bbe27fc5a87867e5924b356ff1abe
Author: Debarshi Ray <debarshir gnome org>
Date: Tue Aug 7 16:00:45 2012 +0200
messageTray: Fix vertically stacked monitors
Always move the bottom monitor and not the primary, because that is
where the tray is. To stop the wallpaper from the bottom monitor
leaking into the primary, adjust the clip as the clone animates
up/down.
Fixes: https://bugzilla.gnome.org/677215
js/ui/messageTray.js | 28 ++++++++++++++++++++++------
1 files changed, 22 insertions(+), 6 deletions(-)
---
diff --git a/js/ui/messageTray.js b/js/ui/messageTray.js
index 4b8ddaf..d8454f6 100644
--- a/js/ui/messageTray.js
+++ b/js/ui/messageTray.js
@@ -2068,12 +2068,13 @@ const MessageTray = new Lang.Class({
if (this._overviewVisible)
return;
- let primaryMonitor = Main.layoutManager.primaryMonitor;
- this._desktopClone = new Clutter.Clone({ source: global.window_group });
- this._desktopClone.set_clip(primaryMonitor.x,
- primaryMonitor.y,
- primaryMonitor.width,
- primaryMonitor.height);
+ let bottomMonitor = Main.layoutManager.bottomMonitor;
+ let geometry = new Clutter.Geometry({ x: bottomMonitor.x,
+ y: bottomMonitor.y,
+ width: bottomMonitor.width,
+ height: bottomMonitor.height
+ });
+ this._desktopClone = new Clutter.Clone({ source: global.window_group, clip: geometry });
Main.uiGroup.add_actor(this._desktopClone);
this._desktopClone.x = 0;
this._desktopClone.y = 0;
@@ -2086,6 +2087,13 @@ const MessageTray = new Lang.Class({
transition: 'easeOutQuad',
onComplete: Lang.bind(this, function() {
this._tweening--;
+ }),
+ onUpdate: Lang.bind(this, function() {
+ let progress = -1 * this._desktopClone.y;
+ this._desktopClone.set_clip(geometry.x,
+ geometry.y + progress,
+ geometry.width,
+ geometry.height - progress);
})
});
this._windowsShifted++;
@@ -2124,6 +2132,7 @@ const MessageTray = new Lang.Class({
if (this._windowsShifted == 0)
return;
+ let geometry = this._desktopClone.clip;
Tweener.addTween(this._desktopClone,
{ y: this._desktopClone.y + this.actor.height,
time: ANIMATION_TIME,
@@ -2134,6 +2143,13 @@ const MessageTray = new Lang.Class({
this._desktopClone.hide();
Main.uiGroup.remove_actor(this._desktopClone);
this._desktopClone = null;
+ }),
+ onUpdate: Lang.bind(this, function() {
+ let progress = this.actor.height + this._desktopClone.y; // y is -ve
+ this._desktopClone.set_clip(geometry.x,
+ geometry.y - progress,
+ geometry.width,
+ geometry.height + progress);
})
});
this._tweening++;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]