gnome-shell/0001-workspaceAnimation-Fix-warning-on-restacking.patch
Florian Müllner a8f30b4604 Fix warning on restacking
Resolves: #2053638
2022-03-30 19:34:15 +02:00

38 lines
1.4 KiB
Diff

From a8b8bff8a9d32b5c80dd2fdd1f7cbe7615835b76 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Florian=20M=C3=BCllner?= <fmuellner@gnome.org>
Date: Tue, 22 Feb 2022 21:16:52 +0100
Subject: [PATCH] workspaceAnimation: Fix warning on restacking
Only workspace groups that are associated with a workspace have a
background. As a result, when restacking window previews we end up
passing `undefined` to clutter_actor_set_child_above_sibling()
instead of null, triggering a warning.
Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/2209>
---
js/ui/workspaceAnimation.js | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/js/ui/workspaceAnimation.js b/js/ui/workspaceAnimation.js
index d240fe156..1731e4027 100644
--- a/js/ui/workspaceAnimation.js
+++ b/js/ui/workspaceAnimation.js
@@ -73,11 +73,13 @@ class WorkspaceGroup extends Clutter.Actor {
this._shouldShowWindow(w.meta_window));
let lastRecord;
+ const bottomActor = this._background ?? null;
for (const windowActor of windowActors) {
const record = this._windowRecords.find(r => r.windowActor === windowActor);
- this.set_child_above_sibling(record.clone, lastRecord ? lastRecord.clone : this._background);
+ this.set_child_above_sibling(record.clone,
+ lastRecord ? lastRecord.clone : bottomActor);
lastRecord = record;
}
}
--
2.35.1