mirror of
https://github.com/microsoft/PowerToys.git
synced 2026-04-05 18:57:19 +02:00
[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:
@@ -1,14 +1,15 @@
|
||||
#pragma once
|
||||
|
||||
#include "SecondaryMouseButtonsHook.h"
|
||||
#include "GenericKeyHook.h"
|
||||
|
||||
interface IFancyZonesSettings;
|
||||
interface IZoneWindow;
|
||||
class SecondaryMouseButtonsHook;
|
||||
class ShiftKeyHook;
|
||||
|
||||
class WindowMoveHandler
|
||||
{
|
||||
public:
|
||||
WindowMoveHandler(const winrt::com_ptr<IFancyZonesSettings>& settings, SecondaryMouseButtonsHook* mouseHook, ShiftKeyHook* shiftHook);
|
||||
WindowMoveHandler(const winrt::com_ptr<IFancyZonesSettings>& settings, SecondaryMouseButtonsHook* mouseHook, ShiftKeyHook* shiftHook, CtrlKeyHook* ctrlHook);
|
||||
~WindowMoveHandler();
|
||||
|
||||
bool InMoveSize() const noexcept;
|
||||
@@ -16,6 +17,7 @@ public:
|
||||
|
||||
void OnMouseDown() noexcept;
|
||||
void OnShiftChangeState(bool state) noexcept; //True for shift down event false for shift up
|
||||
void OnCtrlChangeState(bool state) noexcept; //True for ctrl down event false for ctrl up
|
||||
|
||||
void MoveSizeStart(HWND window, HMONITOR monitor, POINT const& ptScreen, const std::unordered_map<HMONITOR, winrt::com_ptr<IZoneWindow>>& zoneWindowMap) noexcept;
|
||||
void MoveSizeUpdate(HMONITOR monitor, POINT const& ptScreen, const std::unordered_map<HMONITOR, winrt::com_ptr<IZoneWindow>>& zoneWindowMap) noexcept;
|
||||
|
||||
Reference in New Issue
Block a user