From 1e118d8cfe922bc9e7a9e91a70410fa31cf44b9b Mon Sep 17 00:00:00 2001 From: anaximeno Date: Tue, 17 Feb 2026 13:47:49 -0100 Subject: [PATCH] gwl: Avoid adding the window again after removal This was triggering when using the show window in all workspaces option and was leading the app group representation to an irregular state where removed windows would still be counted and show irresponsible thumbnails. --- .../applets/grouped-window-list@cinnamon.org/workspace.js | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/files/usr/share/cinnamon/applets/grouped-window-list@cinnamon.org/workspace.js b/files/usr/share/cinnamon/applets/grouped-window-list@cinnamon.org/workspace.js index 4af591ee8c..34ac623e32 100644 --- a/files/usr/share/cinnamon/applets/grouped-window-list@cinnamon.org/workspace.js +++ b/files/usr/share/cinnamon/applets/grouped-window-list@cinnamon.org/workspace.js @@ -239,8 +239,10 @@ class Workspace { && this.state.monitorWatchList.indexOf(metaWindow.get_monitor()) > -1; } - windowWorkspaceChanged(display, metaWorkspace, metaWindow) { - this.windowAdded(metaWindow, metaWorkspace); + windowWorkspaceChanged(display, metaWindow, metaWorkspace) { + // If the window is removed the metaWorkspace will be null, in that + // case we wouldn't want to add the window again. + if (metaWorkspace) this.windowAdded(metaWorkspace, metaWindow); } windowAdded(metaWorkspace, metaWindow, app, isFavoriteApp) {