Skip to content

Commit 4fd1131

Browse files
committed
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.
1 parent ebc3a30 commit 4fd1131

1 file changed

Lines changed: 4 additions & 2 deletions

File tree

files/usr/share/cinnamon/applets/[email protected]/workspace.js

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -240,8 +240,10 @@ var Workspace = class Workspace {
240240
&& this.state.monitorWatchList.indexOf(metaWindow.get_monitor()) > -1;
241241
}
242242

243-
windowWorkspaceChanged(display, metaWorkspace, metaWindow) {
244-
this.windowAdded(metaWindow, metaWorkspace);
243+
windowWorkspaceChanged(display, metaWindow, metaWorkspace) {
244+
// If the window is removed the metaWorkspace will be null, in that
245+
// case we wouldn't want to add the window again.
246+
if (metaWorkspace) this.windowAdded(metaWorkspace, metaWindow);
245247
}
246248

247249
windowAdded(metaWorkspace, metaWindow, app, isFavoriteApp) {

0 commit comments

Comments
 (0)