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

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

📋 Pull Request Information

Original PR: https://github.com/microsoft/terminal/pull/10025
Author: @zadjii-msft
Created: 5/3/2021
Status: Merged
Merged: 5/4/2021
Merged by: @undefined

Base: mainHead: dev/migrie/f/quake/MoveWindowToDesktop-bug


📝 Commits (1)

  • 178bd04 Only move the window to the current desktop when it isn't on the current desktop already

📊 Changes

1 file changed (+20 additions, -6 deletions)

View changed files

📝 src/cascadia/WindowsTerminal/AppHost.cpp (+20 -6)

📄 Description

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

🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/microsoft/terminal/pull/10025 **Author:** [@zadjii-msft](https://github.com/zadjii-msft) **Created:** 5/3/2021 **Status:** ✅ Merged **Merged:** 5/4/2021 **Merged by:** [@undefined](undefined) **Base:** `main` ← **Head:** `dev/migrie/f/quake/MoveWindowToDesktop-bug` --- ### 📝 Commits (1) - [`178bd04`](https://github.com/microsoft/terminal/commit/178bd04428340452f71ee655e9403d52cd44c120) Only move the window to the current desktop when it isn't on the current desktop already ### 📊 Changes **1 file changed** (+20 additions, -6 deletions) <details> <summary>View changed files</summary> 📝 `src/cascadia/WindowsTerminal/AppHost.cpp` (+20 -6) </details> ### 📄 Description ## 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 --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
claunia added the pull-request label 2026-01-31 09:24:40 +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#27852