mirror of
https://github.com/microsoft/PowerToys.git
synced 2026-04-04 10:16:24 +02:00
Refactor common and fancyzones/utils (#6073)
* Move module-specific functions to module * Refactor FZ utils * Remove 'zonable' from FancyZonesWindowInfo * Address PR comments * Address PR comments * Fix stuff after rebasing
This commit is contained in:
@@ -10,6 +10,8 @@
|
||||
|
||||
#include <utility>
|
||||
|
||||
using namespace FancyZonesUtils;
|
||||
|
||||
namespace
|
||||
{
|
||||
constexpr int C_MULTIPLIER = 10000;
|
||||
@@ -399,7 +401,7 @@ ZoneSet::MoveWindowIntoZoneByDirectionAndPosition(HWND window, HWND windowZone,
|
||||
windowRect.left -= windowZoneRect.left;
|
||||
windowRect.right -= windowZoneRect.left;
|
||||
|
||||
size_t result = ChooseNextZoneByPosition(vkCode, windowRect, zoneRects);
|
||||
size_t result = FancyZonesUtils::ChooseNextZoneByPosition(vkCode, windowRect, zoneRects);
|
||||
if (result < zoneRects.size())
|
||||
{
|
||||
MoveWindowIntoZoneByIndex(window, windowZone, freeZoneIndices[result]);
|
||||
@@ -408,8 +410,8 @@ ZoneSet::MoveWindowIntoZoneByDirectionAndPosition(HWND window, HWND windowZone,
|
||||
else if (cycle)
|
||||
{
|
||||
// Try again from the position off the screen in the opposite direction to vkCode
|
||||
windowRect = PrepareRectForCycling(windowRect, windowZoneRect, vkCode);
|
||||
result = ChooseNextZoneByPosition(vkCode, windowRect, zoneRects);
|
||||
windowRect = FancyZonesUtils::PrepareRectForCycling(windowRect, windowZoneRect, vkCode);
|
||||
result = FancyZonesUtils::ChooseNextZoneByPosition(vkCode, windowRect, zoneRects);
|
||||
|
||||
if (result < zoneRects.size())
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user