mirror of
https://github.com/microsoft/PowerToys.git
synced 2026-04-05 02:36:19 +02:00
Make FancyZone distinguish different modern apps.
This commit is contained in:
committed by
Bartosz Sosnowski
parent
5d75feebdc
commit
0b86941a3b
@@ -1252,14 +1252,13 @@ int ZoneWindow::GetSwitchButtonIndexFromPoint(POINT ptClient) noexcept
|
||||
|
||||
IFACEMETHODIMP_(void) ZoneWindow::SaveWindowProcessToZoneIndex(HWND window) noexcept
|
||||
{
|
||||
wchar_t processPath[MAX_PATH] = { 0 };
|
||||
DWORD processPathSize = GetProcessPath(window, processPath, static_cast<DWORD>(MAX_PATH));
|
||||
if (processPathSize > 0)
|
||||
auto processPath = GetProcessPath(window);
|
||||
if (!processPath.empty())
|
||||
{
|
||||
DWORD zoneIndex = static_cast<DWORD>(m_activeZoneSet->GetZoneIndexFromWindow(window));
|
||||
if (zoneIndex != -1)
|
||||
{
|
||||
RegistryHelpers::SaveAppLastZone(window, processPath, zoneIndex);
|
||||
RegistryHelpers::SaveAppLastZone(window, processPath.data(), zoneIndex);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user