mirror of
https://github.com/microsoft/PowerToys.git
synced 2026-04-05 10:46:33 +02:00
[FancyZones] Improve code quality (part 5: work area initialization) (#23671)
This commit is contained in:
@@ -6,10 +6,10 @@ class WorkArea;
|
||||
|
||||
class WindowDrag
|
||||
{
|
||||
WindowDrag(HWND window, const std::unordered_map<HMONITOR, std::shared_ptr<WorkArea>>& activeWorkAreas);
|
||||
WindowDrag(HWND window, const std::unordered_map<HMONITOR, std::unique_ptr<WorkArea>>& activeWorkAreas);
|
||||
|
||||
public:
|
||||
static std::unique_ptr<WindowDrag> Create(HWND window, const std::unordered_map<HMONITOR, std::shared_ptr<WorkArea>>& activeWorkAreas);
|
||||
static std::unique_ptr<WindowDrag> Create(HWND window, const std::unordered_map<HMONITOR, std::unique_ptr<WorkArea>>& activeWorkAreas);
|
||||
~WindowDrag();
|
||||
|
||||
bool MoveSizeStart(HMONITOR monitor, bool isSnapping);
|
||||
@@ -38,8 +38,8 @@ private:
|
||||
const HWND m_window;
|
||||
WindowProperties m_windowProperties; // MoveSizeWindowInfo of the window at the moment when dragging started
|
||||
|
||||
const std::unordered_map<HMONITOR, std::shared_ptr<WorkArea>>& m_activeWorkAreas; // all WorkAreas on current virtual desktop, mapped with monitors
|
||||
std::shared_ptr<WorkArea> m_currentWorkArea; // "Active" WorkArea, where the move/size is happening. Will update as drag moves between monitors.
|
||||
const std::unordered_map<HMONITOR, std::unique_ptr<WorkArea>>& m_activeWorkAreas; // all WorkAreas on current virtual desktop, mapped with monitors
|
||||
WorkArea* m_currentWorkArea; // "Active" WorkArea, where the move/size is happening. Will update as drag moves between monitors.
|
||||
|
||||
bool m_snappingMode{ false };
|
||||
|
||||
|
||||
Reference in New Issue
Block a user