Repository navigation
windowManager.js: Finish the workspace switch when a window closes during the slide - #14153
Merged
mtwebster merged 1 commit intoNov 20, 2026
Merged
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes #14134. Probably also #11409 and #11929.
Problem
If a window is closed while the workspace switch slide animation is running, Cinnamon never calls
completed_switch_workspace(). Muffin'sswitch_workspace_in_progressstays at 1, and while it is non-zero muffin skips all plugin effects andmeta_window_actor_hide()defers hiding until the switch completes. From then on every minimized window stays painted on screen and only loses focus, until the next workspace switch (which emitskill-switch-workspace) or a Cinnamon restart._switchWorkspace()removes actors fromto_windows/from_windowsonly in theonCompletecallback ofease(), and_makeEaseCallback()only callsonCompletewhen the transition finished. A window actor destroyed during the slide getsisFinished = false, so it stays infrom_windowsforever.Steps to reproduce
With animations enabled:
The probe window stays on screen after it is minimized (3/3 attempts on Cinnamon 6.6.9 / Muffin 6.6.3, X11). Minimizing or moving the window during the slide doesn't trigger it, closing it does.
Fix
onStoppedinstead ofonCompletefor the two slideease()calls, so an interrupted transition also removes the actor from the sets.onStopped(false)is called when an easing actor is destroyed. Runningcleanup_window_effect()on that actor is harmless: thedestroysignal has already been emitted at that point and the calls don't error.kill-switch-workspacehandler before cleaning up.remove_all_transitions()now re-entersfinish_switch_workspace()throughonStopped, and that becomes a no-op.complete()helper that disconnects the kill handler and callscompleted_switch_workspace()exactly once.Testing
I tested this by replacing
WindowManager.prototype._switchWorkspacein a running Cinnamon 6.6.9 session (the function body is identical on master, apart from the new gesture block at the top):kill-switch-workspacepath): window positions and visibility are unchanged afterwards, minimize works, and there are noError in workspace_switch accounting!warnings or JS errors.