[gnome-shell/wip/exalm/gestures2: 6/7] workspaceAnimation: Group sticky windows and moving window
- From: Alexander Mikhaylenko <alexm src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-shell/wip/exalm/gestures2: 6/7] workspaceAnimation: Group sticky windows and moving window
- Date: Wed, 15 Jul 2020 17:09:58 +0000 (UTC)
commit 6f0c060b969302b4fae07c5adfeea44283ab29d1
Author: Alexander Mikhaylenko <exalm7659 gmail com>
Date: Sat Jun 20 23:44:24 2020 +0500
workspaceAnimation: Group sticky windows and moving window
Since the transitions consists of window clones now, all the clones appear
above sticky windows. Clone sticky windows as well, and treat them same as
moving window instead.
https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/1326
js/ui/workspaceAnimation.js | 33 ++++-----------------------------
1 file changed, 4 insertions(+), 29 deletions(-)
---
diff --git a/js/ui/workspaceAnimation.js b/js/ui/workspaceAnimation.js
index 3e86234283..23e5eb0863 100644
--- a/js/ui/workspaceAnimation.js
+++ b/js/ui/workspaceAnimation.js
@@ -141,15 +141,14 @@ var WorkspaceAnimationController = class {
const switchData = {};
this._switchData = switchData;
- switchData.movingWindowBin = new Clutter.Actor();
- switchData.movingWindow = null;
+ switchData.stickyGroup = new WorkspaceGroup(null, this.movingWindow);
switchData.workspaces = [];
switchData.gestureActivated = false;
switchData.inProgress = false;
switchData.container = new Clutter.Actor();
- wgroup.add_child(switchData.movingWindowBin);
+ wgroup.add_child(switchData.stickyGroup);
wgroup.add_child(switchData.container);
let x = 0;
@@ -199,38 +198,14 @@ var WorkspaceAnimationController = class {
else
switchData.container.x = -switchData.workspaces[activeWorkspaceIndex].x;
- wgroup.set_child_above_sibling(switchData.movingWindowBin, null);
-
- if (this.movingWindow) {
- const windowActor = this.movingWindow.get_compositor_private();
-
- switchData.movingWindow = {
- windowActor,
- parent: windowActor.get_parent(),
- };
-
- switchData.movingWindow.parent.remove_child(windowActor);
- switchData.movingWindowBin.add_child(windowActor);
- switchData.movingWindow.windowDestroyId = windowActor.connect('destroy', () => {
- switchData.movingWindow = null;
- });
- }
+ wgroup.set_child_above_sibling(switchData.stickyGroup, null);
}
_finishWorkspaceSwitch(switchData) {
this._switchData = null;
- if (switchData.movingWindow) {
- const record = switchData.movingWindow;
- record.windowActor.disconnect(record.windowDestroyId);
- switchData.movingWindowBin.remove_child(record.windowActor);
- record.parent.add_child(record.windowActor);
-
- switchData.movingWindow = null;
- }
-
switchData.container.destroy();
- switchData.movingWindowBin.destroy();
+ switchData.stickyGroup.destroy();
this.movingWindow = null;
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]