[gnome-shell/wip/exalm/gestures: 427/429] workspaceAnimation: Only create moving window bin when needed
- From: Florian Müllner <fmuellner src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-shell/wip/exalm/gestures: 427/429] workspaceAnimation: Only create moving window bin when needed
- Date: Wed, 26 Feb 2020 11:15:08 +0000 (UTC)
commit f0d498062ddf0c2d3ae465b127b92ffb12241c6b
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 | 14 +++++++-------
1 file changed, 7 insertions(+), 7 deletions(-)
---
diff --git a/js/ui/workspaceAnimation.js b/js/ui/workspaceAnimation.js
index 886083aec9..a5e150f2e3 100644
--- a/js/ui/workspaceAnimation.js
+++ b/js/ui/workspaceAnimation.js
@@ -101,7 +101,6 @@ const 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;
@@ -110,7 +109,6 @@ const 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);
@@ -145,21 +143,24 @@ const WorkspaceAnimation = GObject.registerClass({
info.actor.set_position(x, y);
}
- global.window_group.set_child_above_sibling(this._movingWindowBin, null);
-
if (this._controller.movingWindow) {
let actor = this._controller.movingWindow.get_compositor_private();
+ let container = new Clutter.Actor();
this._movingWindow = {
+ container,
window: actor,
parent: actor.get_parent(),
};
this._movingWindow.parent.remove_child(actor);
- this._movingWindowBin.add_child(actor);
+ this._movingWindow.container.add_child(actor);
this._movingWindow.windowDestroyId = actor.connect('destroy', () => {
this._movingWindow = null;
});
+
+ global.window_group.add_actor(container);
+ global.window_group.set_child_above_sibling(container, null);
}
}
@@ -169,11 +170,10 @@ const WorkspaceAnimation = GObject.registerClass({
record.window.disconnect(record.windowDestroyId);
record.window.get_parent().remove_child(record.window);
record.parent.add_child(record.window);
+ record.container.destroy();
this._movingWindow = null;
}
-
- this._movingWindowBin.destroy();
}
_getPositionForDirection(direction, fromWs, toWs) {
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]