mirror of
https://github.com/microsoft/PowerToys.git
synced 2026-04-08 04:07:40 +02: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:
@@ -189,12 +189,6 @@ namespace JSONHelpers
|
||||
|
||||
std::optional<CustomZoneSetData> FindCustomZoneSet(const std::wstring& guid) const;
|
||||
|
||||
inline const std::wstring GetActiveDeviceId() const
|
||||
{
|
||||
std::scoped_lock lock{ dataLock };
|
||||
return activeDeviceId;
|
||||
}
|
||||
|
||||
inline const std::unordered_map<std::wstring, DeviceInfoData>& GetDeviceInfoMap() const
|
||||
{
|
||||
std::scoped_lock lock{ dataLock };
|
||||
@@ -219,7 +213,6 @@ namespace JSONHelpers
|
||||
appZoneHistoryMap.clear();
|
||||
deviceInfoMap.clear();
|
||||
customZoneSetsMap.clear();
|
||||
activeDeviceId.clear();
|
||||
}
|
||||
|
||||
inline void SetDeviceInfo(const std::wstring& deviceId, DeviceInfoData data)
|
||||
@@ -234,12 +227,6 @@ namespace JSONHelpers
|
||||
}
|
||||
#endif
|
||||
|
||||
inline void SetActiveDeviceId(const std::wstring& deviceId)
|
||||
{
|
||||
std::scoped_lock lock{ dataLock };
|
||||
activeDeviceId = deviceId;
|
||||
}
|
||||
|
||||
inline bool DeleteTmpFile(std::wstring_view tmpFilePath) const
|
||||
{
|
||||
return DeleteFileW(tmpFilePath.data());
|
||||
@@ -283,7 +270,6 @@ namespace JSONHelpers
|
||||
std::unordered_map<std::wstring, DeviceInfoData> deviceInfoMap{};
|
||||
std::unordered_map<std::wstring, CustomZoneSetData> customZoneSetsMap{};
|
||||
|
||||
std::wstring activeDeviceId;
|
||||
std::wstring jsonFilePath;
|
||||
std::wstring appZoneHistoryFilePath;
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user