From a8b8bff8a9d32b5c80dd2fdd1f7cbe7615835b76 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Florian=20M=C3=BCllner?= 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: --- 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