[gnome-shell/wip/pressure: 4/14] messageTray: Don't actually move the windows
- From: Jasper St. Pierre <jstpierre src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-shell/wip/pressure: 4/14] messageTray: Don't actually move the windows
- Date: Mon, 30 Jul 2012 23:48:10 +0000 (UTC)
commit d61e838918731d17e548c407ff2766d1300d1a63
Author: Jasper St. Pierre <jstpierre mecheye net>
Date: Mon Jul 30 20:22:00 2012 -0300
messageTray: Don't actually move the windows
Tween the window_group instead. Since we're going to have a grab
when the message tray is fully open, this makes sense.
js/ui/messageTray.js | 91 ++++++-------------------------------------------
1 files changed, 12 insertions(+), 79 deletions(-)
---
diff --git a/js/ui/messageTray.js b/js/ui/messageTray.js
index 37e56a2..3031951 100644
--- a/js/ui/messageTray.js
+++ b/js/ui/messageTray.js
@@ -1501,8 +1501,6 @@ const MessageTray = new Lang.Class({
this._notificationRemoved = false;
this._reNotifyAfterHideNotification = null;
this._inFullscreen = false;
- this._tweening = 0;
- this._windowsShifted = 0;
Main.layoutManager.trayBox.add_actor(this.actor);
this.actor.y = 0;
@@ -1707,7 +1705,6 @@ const MessageTray = new Lang.Class({
toggle: function() {
this._traySummoned = !this._traySummoned;
- Main.layoutManager.togglePanelStruts();
this._updateState();
},
@@ -2030,95 +2027,31 @@ const MessageTray = new Lang.Class({
},
_showTray: function() {
- // Bail out if we are in the middle of tweening the tray or the
- // windows.
- if (this._tweening != 0)
+ // Don't move the windows up if we are in the overview.
+ if (this._overviewVisible)
return;
this._tween(this.actor, '_trayState', State.SHOWN,
{ y: -this.actor.height,
time: ANIMATION_TIME,
- transition: 'easeOutQuad',
- onComplete:
- { apply: Lang.bind(this, function() {
- this._tweening--;
- })
- }
- });
- this._tweening++;
-
- // Don't move the windows up if we are in the overview.
- if (this._overviewVisible)
- return;
-
- Main.layoutManager.togglePanelStruts();
-
- 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;
+ transition: 'easeOutQuad' });
- 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._tweening--;
- })
- });
- this._windowsShifted++;
- this._tweening++;
- }
+ Tweener.addTween(global.window_group,
+ { y: -this.actor.height,
+ time: ANIMATION_TIME,
+ transition: 'easeOutQuad' });
},
_hideTray: function() {
- // Bail out if we are in the middle of tweening the tray or the
- // windows.
- if (this._tweening != 0)
- return;
-
this._tween(this.actor, '_trayState', State.HIDDEN,
{ y: 0,
time: ANIMATION_TIME,
- transition: 'easeOutQuad',
- onComplete:
- { apply: Lang.bind(this, function() {
- this._tweening--;
- })
- }
- });
- this._tweening++;
+ transition: 'easeOutQuad' });
- // Don't move the windows down if had not moved them up. We can't use
- // this._overviewVisible to check whether we were in the overview
- // because it gets unset before this method is invoked.
- 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() {
- let rect = window.get_outer_rect();
- window.move_frame(true, rect.x, rect.y + this.actor.height);
- this._windowsShifted--;
- this._tweening--;
- if (this._windowsShifted == 0)
- Main.layoutManager.togglePanelStruts();
- })
- });
- this._tweening++;
- }
+ Tweener.addTween(global.window_group,
+ { y: 0,
+ time: ANIMATION_TIME,
+ transition: 'easeOutQuad' });
},
_onIdleMonitorWatch: function(monitor, id, userBecameIdle) {
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]