[FancyZones] Improve code quality (part 6) (#28034)

This commit is contained in:
Seraphima Zykova
2023-08-22 15:57:45 +03:00
committed by GitHub
parent 7c7f6cabf7
commit 6acae53e2c
29 changed files with 2669 additions and 1239 deletions

View File

@@ -15,7 +15,7 @@ namespace ZonedWindowProperties
const wchar_t PropertySortKeyWithinZone[] = L"FancyZones_TabSortKeyWithinZone";
}
void FancyZonesWindowProperties::StampZoneIndexProperty(HWND window, const ZoneIndexSet& zoneSet)
bool FancyZonesWindowProperties::StampZoneIndexProperty(HWND window, const ZoneIndexSet& zoneSet)
{
RemoveZoneIndexProperty(window);
ZoneIndexSetBitmask bitmask = ZoneIndexSetBitmask::FromIndexSet(zoneSet);
@@ -33,6 +33,7 @@ void FancyZonesWindowProperties::StampZoneIndexProperty(HWND window, const ZoneI
if (!SetProp(window, ZonedWindowProperties::PropertyMultipleZone64ID, rawData))
{
Logger::error(L"Failed to stamp window {}", get_last_error_or_default(GetLastError()));
return false;
}
}
@@ -49,8 +50,11 @@ void FancyZonesWindowProperties::StampZoneIndexProperty(HWND window, const ZoneI
if (!SetProp(window, ZonedWindowProperties::PropertyMultipleZone128ID, rawData))
{
Logger::error(L"Failed to stamp window {}", get_last_error_or_default(GetLastError()));
return false;
}
}
return true;
}
void FancyZonesWindowProperties::RemoveZoneIndexProperty(HWND window)