[gnome-shell/wip/message-tray] messageTray: Move the windows up/down when the tray is toggled
- From: Debarshi Ray <debarshir src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-shell/wip/message-tray] messageTray: Move the windows up/down when the tray is toggled
- Date: Mon, 30 Jul 2012 15:36:56 +0000 (UTC)
commit ade3558ab097e9e483d159e3b8af528e72794245
Author: Debarshi Ray <debarshir gnome org>
Date: Sat Jul 14 13:10:40 2012 +0200
messageTray: Move the windows up/down when the tray is toggled
Only the windows on the primary monitor are moved because the
secondary does not have a message tray.
Fixes: https://bugzilla.gnome.org/677215
js/ui/messageTray.js | 35 ++++++++++++++++++++++++++++++-----
1 files changed, 30 insertions(+), 5 deletions(-)
---
diff --git a/js/ui/messageTray.js b/js/ui/messageTray.js
index 1f36b4a..73bdaec 100644
--- a/js/ui/messageTray.js
+++ b/js/ui/messageTray.js
@@ -1549,6 +1549,7 @@ const MessageTray = new Lang.Class({
this._notificationRemoved = false;
this._reNotifyAfterHideNotification = null;
this._inFullscreen = false;
+ this._windowsShifted = 0;
this._corner = new Clutter.Rectangle({ width: 1,
height: 1,
@@ -2257,6 +2258,9 @@ const MessageTray = new Lang.Class({
transition: 'easeOutQuad'
});
+ if (this._overviewVisible)
+ return;
+
Main.layoutManager.togglePanelStruts();
let actors = global.get_window_actors();
@@ -2264,8 +2268,17 @@ const MessageTray = new Lang.Class({
let window = actors[i].metaWindow;
if (!window.is_on_primary_monitor())
continue;
- let rect = window.get_outer_rect();
- window.move_frame(true, rect.x, rect.y - this.actor.height);
+
+ Tweener.addTween(actors[i],
+ { y: actors[i].y - this.actor.height,
+ time: ANIMATION_TIME,
+ transition: 'easeOutQuad',
+ onComplete: Lang.bind(this, function() {
+ let rect = window.get_outer_rect();
+ window.move_frame(true, rect.x, rect.y - this.actor.height);
+ })
+ });
+ this._windowsShifted++;
}
},
@@ -2276,15 +2289,27 @@ const MessageTray = new Lang.Class({
transition: 'easeOutQuad'
});
- Main.layoutManager.togglePanelStruts();
+ 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;
- let rect = window.get_outer_rect();
- window.move_frame(true, rect.x, rect.y + this.actor.height);
+
+ Tweener.addTween(actors[i],
+ { y: actors[i].y + this.actor.height,
+ time: ANIMATION_TIME,
+ transition: 'easeOutQuad',
+ onComplete: Lang.bind(this, function() {
+ let rect = window.get_outer_rect();
+ window.move_frame(true, rect.x, rect.y + this.actor.height);
+ this._windowsShifted--;
+ if (this._windowsShifted == 0)
+ Main.layoutManager.togglePanelStruts();
+ })
+ });
}
},
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]