[gnome-shell/wip/exalm/gestures: 9/11] workspaceAnimation: Only create moving window bin when needed
- From: Alexander Mikhaylenko <alexm src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-shell/wip/exalm/gestures: 9/11] workspaceAnimation: Only create moving window bin when needed
- Date: Sat, 2 Nov 2019 10:41:00 +0000 (UTC)
commit 0e72775bd9e6e3dc5c93b3c7063a2d7ec33db8d9
Author: Alexander Mikhaylenko <alexm gnome org>
Date: Fri Jul 5 15:48:38 2019 +0500
workspaceAnimation: Only create moving window bin when needed
https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/605
js/ui/workspaceAnimation.js | 16 +++++++++-------
1 file changed, 9 insertions(+), 7 deletions(-)
---
diff --git a/js/ui/workspaceAnimation.js b/js/ui/workspaceAnimation.js
index 6dddf3c73f..a80443b594 100644
--- a/js/ui/workspaceAnimation.js
+++ b/js/ui/workspaceAnimation.js
@@ -95,7 +95,6 @@ var WorkspaceAnimation = GObject.registerClass({
this.connect('destroy', this._onDestroy.bind(this));
this._controller = controller;
- this._movingWindowBin = new Clutter.Actor();
this._movingWindow = null;
this._surroundings = {};
this._progress = 0;
@@ -104,7 +103,6 @@ var WorkspaceAnimation = GObject.registerClass({
this.add_actor(this._container);
global.window_group.add_actor(this);
- global.window_group.add_actor(this._movingWindowBin);
let workspaceManager = global.workspace_manager;
let curWs = workspaceManager.get_workspace_by_index(from);
@@ -137,18 +135,22 @@ var WorkspaceAnimation = GObject.registerClass({
info.actor.set_position(x, y);
}
- this._movingWindowBin.raise_top();
-
if (this._controller.movingWindow) {
let actor = this._controller.movingWindow.get_compositor_private();
+ let container = new Clutter.Actor();
- this._movingWindow = { window: actor,
+ this._movingWindow = { container: container,
+ window: actor,
parent: actor.get_parent() };
- actor.reparent(this._movingWindowBin);
+ actor.reparent(this._movingWindow.container);
this._movingWindow.windowDestroyId = actor.connect('destroy', () => {
this._movingWindow = null;
});
+
+ global.window_group.add_actor(container);
+
+ container.raise_top();
}
}
@@ -159,12 +161,12 @@ var WorkspaceAnimation = GObject.registerClass({
let record = this._movingWindow;
record.window.disconnect(record.windowDestroyId);
record.window.reparent(record.parent);
+ record.container.destroy();
this._movingWindow = null;
}
this._container.destroy();
- this._movingWindowBin.destroy();
}
_getPositionForDirection(direction, fromWs, toWs) {
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]