Add AppUserModel_ID awareness to FancyZones #41656
Open
+35
−4
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.
Summary of the Pull Request
This change allows FancyZones to distinguish between logically distinct windows of the same executable like browser profiles, progressive web apps and others where the shell normally gives them separate taskbar icons.
PR Checklist
Detailed Description of the Pull Request / Additional comments
Applications that set their shell
AppUserModel_ID
(mostly browsers) will need to be repositioned once immediately after updating to a version that includes this.To remain backward compatible for all other applications, the json variable remains "app-path" even though the conditionally appended "?<AppUserModel_ID>" for some windows means it is no longer always a valid path. It is never actually used as a path, however. It is merely a key for the Map. The '?' separator, being illegal in a filename on Windows, makes it easy to strip off if anyone ever needs to do so in future. I similarly left the internal variable name as
processPath
, mostly just to minimize the size of the diff.Validation Steps Performed
The build succeeds on my Windows 11 system and I've been running with it on my daily driver for two days with heavy use of PWAs and profiles on Chrome, Edge and Brave. I don't have a Windows 10 system or image to make a VM but I don't see any changes in the shell API that's used here. Firefox doesn't implement the necessary shell integration natively so its behavior doesn't change but the native helper for the third party PWA extension might.