[gnome-shell/wip/message-tray: 18/18] messageTray: Clone, clip & move the window_group instead of each actor
- From: Debarshi Ray <debarshir src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-shell/wip/message-tray: 18/18] messageTray: Clone, clip & move the window_group instead of each actor
- Date: Mon, 6 Aug 2012 22:38:32 +0000 (UTC)
commit 620b3c4c542f943b09251b508d179306b3f5fddf
Author: Debarshi Ray <debarshir gnome org>
Date: Tue Aug 7 00:25:54 2012 +0200
messageTray: Clone, clip & move the window_group instead of each actor
This way we can handle straddling windows better by clipping them at
the monitor boundary.
Fixes: https://bugzilla.gnome.org/677215
js/ui/messageTray.js | 44 ++++----------------------------------------
1 files changed, 4 insertions(+), 40 deletions(-)
---
diff --git a/js/ui/messageTray.js b/js/ui/messageTray.js
index 096b894..4b8ddaf 100644
--- a/js/ui/messageTray.js
+++ b/js/ui/messageTray.js
@@ -2068,34 +2068,16 @@ const MessageTray = new Lang.Class({
if (this._overviewVisible)
return;
- let actors = global.get_window_actors();
- for (let i = 0; i < actors.length; i++) {
- let window = actors[i].metaWindow;
- if (!window.is_on_primary_monitor())
- continue;
-
- Tweener.addTween(actors[i],
- { y: actors[i].y - this.actor.height,
- time: ANIMATION_TIME,
- transition: 'easeOutQuad',
- onComplete: Lang.bind(this, function() {
- this._tweening--;
- })
- });
- this._windowsShifted++;
- this._tweening++;
- }
-
let primaryMonitor = Main.layoutManager.primaryMonitor;
- this._desktopClone = new Clutter.Clone({ source: global.background_actor });
+ this._desktopClone = new Clutter.Clone({ source: global.window_group });
this._desktopClone.set_clip(primaryMonitor.x,
primaryMonitor.y,
primaryMonitor.width,
primaryMonitor.height);
- global.window_group.add_actor(this._desktopClone);
+ Main.uiGroup.add_actor(this._desktopClone);
this._desktopClone.x = 0;
this._desktopClone.y = 0;
- this._desktopClone.raise(global.background_actor);
+ this._desktopClone.raise(global.window_group);
this._desktopClone.show();
Tweener.addTween(this._desktopClone,
@@ -2142,24 +2124,6 @@ const MessageTray = new Lang.Class({
if (this._windowsShifted == 0)
return;
- let actors = global.get_window_actors();
- for (let i = 0; i < actors.length; i++) {
- let window = actors[i].metaWindow;
- if (!window.is_on_primary_monitor())
- continue;
-
- Tweener.addTween(actors[i],
- { y: actors[i].y + this.actor.height,
- time: ANIMATION_TIME,
- transition: 'easeOutQuad',
- onComplete: Lang.bind(this, function() {
- this._windowsShifted--;
- this._tweening--;
- })
- });
- this._tweening++;
- }
-
Tweener.addTween(this._desktopClone,
{ y: this._desktopClone.y + this.actor.height,
time: ANIMATION_TIME,
@@ -2168,7 +2132,7 @@ const MessageTray = new Lang.Class({
this._windowsShifted--;
this._tweening--;
this._desktopClone.hide();
- global.window_group.remove_actor(this._desktopClone);
+ Main.uiGroup.remove_actor(this._desktopClone);
this._desktopClone = null;
})
});
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]