mirror of
https://github.com/microsoft/PowerToys.git
synced 2025-12-16 19:57:57 +01:00
[FancyZones] Improve monitor work area handling (#3418)
* Initial design for improving handling of different engaged work areas in fancyzones. * Remove active device id check in ZoneWindow. * Remove concept of active device identifier in JSONHelpers. * Refactor interface description and add new method. * Simplify ZoneWindow initialization. * Default value for active ZoneWindow during move/size. * Add newline at the end of file. * Use COM pointers for ZoneWindow instead of passing raw ptr. * Solve few issues after merging with master. * Fix typo in documentation.
This commit is contained in:
@@ -356,10 +356,6 @@ namespace JSONHelpers
|
||||
mapEntry.key() = replaceDesktopId(id);
|
||||
deviceInfoMap.insert(std::move(mapEntry));
|
||||
}
|
||||
if (activeDeviceId == DEFAULT_GUID)
|
||||
{
|
||||
activeDeviceId = replaceDesktopId(activeDeviceId);
|
||||
}
|
||||
SaveFancyZonesData();
|
||||
}
|
||||
|
||||
@@ -552,16 +548,11 @@ namespace JSONHelpers
|
||||
{
|
||||
if (auto deviceInfo = DeviceInfoJSON::FromJson(zoneSetJson.value()); deviceInfo.has_value())
|
||||
{
|
||||
activeDeviceId = deviceInfo->deviceId;
|
||||
deviceInfoMap[activeDeviceId] = std::move(deviceInfo->data);
|
||||
deviceInfoMap[deviceInfo->deviceId] = std::move(deviceInfo->data);
|
||||
DeleteTmpFile(tmpFilePath);
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
activeDeviceId.clear();
|
||||
}
|
||||
}
|
||||
|
||||
bool FancyZonesData::ParseCustomZoneSetFromTmpFile(std::wstring_view tmpFilePath)
|
||||
|
||||
Reference in New Issue
Block a user