Conversation
| #endif | ||
| const auto path = wil::QueryFullProcessImageNameW<std::wstring>(); | ||
| const auto hash = til::hash(path); | ||
| fmt::format_to(std::back_inserter(aumid), FMT_COMPILE(L".{:016x}"), hash); |
There was a problem hiding this comment.
what does this do on x86? just have a bunch of 0s in?
There was a problem hiding this comment.
til::hash returns a size_t, so {:016x} would have the first 8 digits be 0s.
That said, I added the #ifdef _WIN64 branches for consistency with the other places that's done in this file.
There was a problem hiding this comment.
If you move this up, before the GetCurrentProcessToken block, couldn't you just use the windowClassName as an argument to SetCurrentProcessExplicitAppUserModelID?
There was a problem hiding this comment.
Sorry for missing this! We wouldn't be able to use the windowClassName as the AUMID because it can't contain spaces (reference).
That said, I can reuse the ifdefs to set the aumid, IsPackaged() check, and hash. Making the change now.
There was a problem hiding this comment.
You can also just remove the spaces from the window class! It bears no real meaning.
There was a problem hiding this comment.
I'm OK with having them be separate for now.
DHowett
left a comment
There was a problem hiding this comment.
(also worth looking at Leonard's comment!)
|
/azp run |
Summary of the Pull Request
Does what it says on the tin. Sets the AUMID to
WindowsTerminal.<hash>with a slightly different prefix based on the branding. The hash is based on the full process image name and user SID.Extracted from #20013