mirror of
https://github.com/microsoft/PowerToys.git
synced 2026-04-05 18:57:19 +02:00
[FancyZones] Remove resolution from "device-id" (#17412)
* removed resolution from device id * update applied layouts device id * app zone history device id updated * moved old device id parsing * updated tests * remove resolution in the editor * remove resolution from device id generation * update editor params
This commit is contained in:
@@ -862,23 +862,10 @@ void FancyZones::AddWorkArea(HMONITOR monitor, const std::wstring& deviceId) noe
|
||||
if (monitor)
|
||||
{
|
||||
uniqueId.deviceName = FancyZonesUtils::TrimDeviceId(deviceId);
|
||||
|
||||
MONITORINFOEXW mi;
|
||||
mi.cbSize = sizeof(mi);
|
||||
if (GetMonitorInfo(monitor, &mi))
|
||||
{
|
||||
const FancyZonesUtils::Rect monitorRect(mi.rcMonitor);
|
||||
uniqueId.width = monitorRect.width();
|
||||
uniqueId.height = monitorRect.height();
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
uniqueId.deviceName = ZonedWindowProperties::MultiMonitorDeviceID;
|
||||
|
||||
RECT combinedResolution = FancyZonesUtils::GetAllMonitorsCombinedRect<&MONITORINFO::rcMonitor>();
|
||||
uniqueId.width = combinedResolution.right - combinedResolution.left;
|
||||
uniqueId.height = combinedResolution.bottom - combinedResolution.top;
|
||||
}
|
||||
|
||||
FancyZonesDataTypes::DeviceIdData parentId{};
|
||||
|
||||
Reference in New Issue
Block a user