[FancyZones] Hold Ctrl to select any number of zones (#4850)

* Started work

* Did something, not yet sure that it works

* Sort of works

* Cleari highlighted zones when using Ctrl after leaving a monitor

* Remove unnecessary line

* Enhanced UX. Maybe refactor?

* Changed the logic behind zone selection when dragging

* Various fixups
This commit is contained in:
Ivan Stošić
2020-07-10 11:06:01 +02:00
committed by GitHub
parent b1d662a5b1
commit 412d80efe3
12 changed files with 203 additions and 109 deletions

View File

@@ -467,7 +467,7 @@ namespace FancyZonesUnitTests
m_zoneWindow = MakeZoneWindow(m_hostPtr, m_hInst, m_monitor, m_uniqueId.str(), {}, false);
const auto expected = S_OK;
const auto actual = m_zoneWindow->MoveSizeUpdate(POINT{ 0, 0 }, true);
const auto actual = m_zoneWindow->MoveSizeUpdate(POINT{ 0, 0 }, true, false);
Assert::AreEqual(expected, actual);
}
@@ -477,7 +477,7 @@ namespace FancyZonesUnitTests
m_zoneWindow = MakeZoneWindow(m_hostPtr, m_hInst, m_monitor, m_uniqueId.str(), {}, false);
const auto expected = S_OK;
const auto actual = m_zoneWindow->MoveSizeUpdate(POINT{ -10, -10 }, true);
const auto actual = m_zoneWindow->MoveSizeUpdate(POINT{ -10, -10 }, true, false);
Assert::AreEqual(expected, actual);
}
@@ -487,7 +487,7 @@ namespace FancyZonesUnitTests
m_zoneWindow = MakeZoneWindow(m_hostPtr, m_hInst, m_monitor, m_uniqueId.str(), {}, false);
const auto expected = S_OK;
const auto actual = m_zoneWindow->MoveSizeUpdate(POINT{ m_monitorInfo.rcMonitor.right + 1, m_monitorInfo.rcMonitor.bottom + 1 }, true);
const auto actual = m_zoneWindow->MoveSizeUpdate(POINT{ m_monitorInfo.rcMonitor.right + 1, m_monitorInfo.rcMonitor.bottom + 1 }, true, false);
Assert::AreEqual(expected, actual);
}