[FancyZones] Shift + StickyKeys behavior fix (#6039)

This commit is contained in:
Seraphima Zykova
2020-08-24 10:19:39 +03:00
committed by GitHub
parent f64df97652
commit 845bb466c6
8 changed files with 94 additions and 109 deletions

View File

@@ -1,7 +1,6 @@
#pragma once
#include "SecondaryMouseButtonsHook.h"
#include "GenericKeyHook.h"
interface IFancyZonesSettings;
interface IZoneWindow;
@@ -9,16 +8,12 @@ interface IZoneWindow;
class WindowMoveHandler
{
public:
WindowMoveHandler(const winrt::com_ptr<IFancyZonesSettings>& settings, SecondaryMouseButtonsHook* mouseHook, ShiftKeyHook* shiftHook, CtrlKeyHook* ctrlHook);
WindowMoveHandler(const winrt::com_ptr<IFancyZonesSettings>& settings, const std::function<void()>& keyUpdateCallback);
~WindowMoveHandler();
bool InMoveSize() const noexcept;
bool IsDragEnabled() const noexcept;
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;
void MoveSizeEnd(HWND window, POINT const& ptScreen, const std::unordered_map<HMONITOR, winrt::com_ptr<IZoneWindow>>& zoneWindowMap) noexcept;