[PR #10025] Only move the window to the current desktop when it isn't on that one already #27857

Closed
opened 2026-01-31 09:24:42 +00:00 by claunia · 0 comments
Owner

Original Pull Request: https://github.com/microsoft/terminal/pull/10025

State: closed
Merged: Yes


Summary of the Pull Request

This is to mitigate MSFT:33035972. If you call MoveWindowToDesktop while an app is set to "Show windows from this app on all desktops", the OS will clear that "Show windows from this app on all desktops" state. But it won't clear that state from the task view, so it'll just plain look broken.

We can mitigate this just by checking if we're already on the current desktop first. "Show windows from this app on all desktops" windows will always be on every desktop, so that API will return true, and we can avoid tearing the state.

References

PR Checklist

Validation Steps Performed

  • it works again
**Original Pull Request:** https://github.com/microsoft/terminal/pull/10025 **State:** closed **Merged:** Yes --- ## Summary of the Pull Request This is to mitigate MSFT:33035972. If you call `MoveWindowToDesktop` while an app is set to "Show windows from this app on all desktops", the OS will clear that "Show windows from this app on all desktops" state. But it _won't_ clear that state from the task view, so it'll just plain look broken. We can mitigate this just by checking if we're already on the current desktop first. "Show windows from this app on all desktops" windows will _always_ be on every desktop, so that API will return true, and we can avoid tearing the state. ## References * added in #9954 ## PR Checklist * [x] Closes https://github.com/microsoft/terminal/projects/5#card-60325102 * [x] I work here * [ ] Tests aren't possible * [n/a] Requires documentation to be updated ## Validation Steps Performed * it works again
claunia added the pull-request label 2026-01-31 09:24:42 +00:00
Sign in to join this conversation.
No Label pull-request
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/terminal#27857