[gnome-shell/gnome-41] workspaceAnimation: Fix warning on restacking
- From: Florian Müllner <fmuellner src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-shell/gnome-41] workspaceAnimation: Fix warning on restacking
- Date: Sun, 20 Mar 2022 20:21:29 +0000 (UTC)
commit de8c23189bdc71ff16ce3e60da89fd0fdc78d8f6
Author: Florian Müllner <fmuellner gnome org>
Date: Tue Feb 22 21:16:52 2022 +0100
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>
(cherry picked from commit 5d1b9a429e11260fed2d0064629452a6bcda73ad)
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 d240fe1562..1731e40276 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;
}
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]