Skip to content

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

Closed
KAMI911 wants to merge 6 commits into
linuxmint:masterfrom
KAMI911:fix/gwl-ghost-icons-14118
Closed

KAMI911 wants to merge 6 commits into
linuxmint:masterfrom
KAMI911:fix/gwl-ghost-icons-14118

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

KAMI911 and others added 6 commits December 5, 2021 22:28
The motivation behind the extra groups to create pre-defined settings for special group of users.

For example we can add firewall and/or proxy that blocks unwanted websites, do dektop settings during user creation, etc.

This is a work-in-progress example, to make Cinnamon desktop more youngster and elder friendly.
…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>
@mtwebster

Copy link
Copy Markdown
Member

There are unrelated changes here. No more tests either please

@KAMI911 KAMI911 closed this Nov 11, 2026
@KAMI911
KAMI911 deleted the fix/gwl-ghost-icons-14118 branch November 11, 2026 18:52
@KAMI911

KAMI911 commented Nov 11, 2026

Copy link
Copy Markdown
Contributor Author

Sorry, I accidentally created a PR on top of another commit.

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

2 participants