Skip to content

Commit b902318

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 50c9464 commit b902318

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
@@ -239,8 +239,10 @@ class Workspace {
239239
&& this.state.monitorWatchList.indexOf(metaWindow.get_monitor()) > -1;
240240
}
241241

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

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

0 commit comments

Comments
 (0)