Skip to content

Conversation

jsclary
Copy link

@jsclary jsclary commented Sep 5, 2025

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.

@jsclary
Copy link
Author

jsclary commented Sep 5, 2025

@microsoft-github-policy-service agree

@jsclary jsclary marked this pull request as ready for review September 5, 2025 21:05
@niels9001 niels9001 requested a review from Copilot September 6, 2025 07:08
Copy link
Contributor

@Copilot Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR enhances FancyZones to use AppUserModel_ID to distinguish between logically distinct windows of the same executable, such as browser profiles and progressive web apps that typically receive separate taskbar icons.

  • Adds a new method GetProcessPathWithAUMID() that retrieves both process path and AppUserModel_ID
  • Updates all existing calls to use the new combined identifier instead of just process path
  • Maintains backward compatibility by keeping the JSON field name as "app-path" despite now containing additional data

Reviewed Changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 2 comments.

File Description
AppZoneHistory.h Declares new GetProcessPathWithAUMID() static method
AppZoneHistory.cpp Implements AppUserModel_ID retrieval and updates all process path calls to use the enhanced identifier

Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.

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.

Fixes issue microsoft#34713
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.

Move newly created windows to last known zone Chrome and PWA
1 participant