Skip to content

grouped-window-list: fix ghost icons left by closed windows (showAllWorkspaces) - #14124

Open
KAMI911 wants to merge 1 commit into
linuxmint:masterfrom
KAMI911:fix/gwl-ghost-icons-14118-clean
Open

KAMI911 wants to merge 1 commit into
linuxmint:masterfrom
KAMI911:fix/gwl-ghost-icons-14118-clean

Conversation

@KAMI911

@KAMI911 KAMI911 commented Nov 11, 2026

Copy link
Copy Markdown
Contributor

Summary

  • Fixes Grouped Window List does not remove icons for windows which have closed when "show windows from all workspaces" is set true #14118: closed windows left ghost icons in Grouped Window List when "Show windows from all workspaces" is enabled.
  • windowRemoved() used a has_focus() + active-workspace-index heuristic to guess whether a window was just moving workspaces vs. actually closing. That guess is wrong whenever a focused window on a background workspace (or a transient dialog) actually closes, which permanently vetoes the removal and leaves a stuck icon.
  • Replaced it with a check of metaWindow.get_workspace(): Mutter/Muffin re-assigns a window to its new workspace before firing window-removed on the old one, so a window that still has a (different) workspace is moving, not closing; one with no workspace left is genuinely gone and must be removed everywhere.

Test plan

  • Added tests/unit/grouped-window-list-workspace-remove.cjs, a standalone Node harness (no Cinnamon session needed) that loads the real workspace.js and reproduces the bug: with the old heuristic, closing a focused window on a non-active workspace left it registered on every workspace; with the fix it's correctly removed everywhere, while a window that merely changes workspace still stays indexed (no regression).
  • node tests/unit/grouped-window-list-workspace-remove.cjs passes.
  • Existing node tests/unit/grouped-window-list-workspace.cjs still passes.

🤖 Generated with Claude Code

…AllWorkspaces

windowRemoved() used to abort removing a closed window from every
workspace's list whenever it still had focus and its own workspace
wasn't the active one. That heuristic is unreliable for a window that
is actually closing (common when closing a focused window on a
background workspace, or transient dialogs), so the removal was
vetoed forever and the icon stayed stuck.

Replace it with a check of metaWindow.get_workspace(): Mutter/Muffin
re-assigns a window to its new workspace before firing
'window-removed' on the old one, so a window that still has a
(different) workspace is moving, not closing; one with no workspace
left is genuinely gone and must be removed everywhere.

Fixes linuxmint#14118

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Grouped Window List does not remove icons for windows which have closed when "show windows from all workspaces" is set true

1 participant