mirror of
https://github.com/microsoft/PowerToys.git
synced 2026-04-06 19:26:39 +02:00
[FancyZones] Improve zone selection (#9447)
* Improve zone selection algorithm
* Thanks, spell checker
* Fix failing test case
* Add error logging
* Added support for different zone selection algorithms
* Revert "Fix failing test case"
This reverts commit 9f31a8a7e6.
This commit is contained in:
@@ -1,6 +1,7 @@
|
||||
#pragma once
|
||||
|
||||
#include "Zone.h"
|
||||
#include "Settings.h"
|
||||
|
||||
namespace FancyZonesDataTypes
|
||||
{
|
||||
@@ -151,6 +152,13 @@ interface __declspec(uuid("{E4839EB7-669D-49CF-84A9-71A2DFD851A3}")) IZoneSet :
|
||||
IFACEMETHOD_(std::vector<size_t>, GetCombinedZoneRange)(const std::vector<size_t>& initialZones, const std::vector<size_t>& finalZones) const = 0;
|
||||
};
|
||||
|
||||
enum struct ZoneSelectionAlgorithm
|
||||
{
|
||||
SMALLEST = 0,
|
||||
LARGEST = 1,
|
||||
SUBREGION = 2,
|
||||
};
|
||||
|
||||
struct ZoneSetConfig
|
||||
{
|
||||
ZoneSetConfig(
|
||||
@@ -169,6 +177,7 @@ struct ZoneSetConfig
|
||||
FancyZonesDataTypes::ZoneSetLayoutType LayoutType{};
|
||||
HMONITOR Monitor{};
|
||||
int SensitivityRadius;
|
||||
ZoneSelectionAlgorithm SelectionAlgorithm = ZoneSelectionAlgorithm::SMALLEST;
|
||||
};
|
||||
|
||||
winrt::com_ptr<IZoneSet> MakeZoneSet(ZoneSetConfig const& config) noexcept;
|
||||
|
||||
Reference in New Issue
Block a user