mirror of
https://github.com/microsoft/PowerToys.git
synced 2026-04-07 19:57:07 +02:00
[Fancy Zones] Middle click to toggle spanning multiple zones (#26079)
* Attempt to use middle click to toggle zone spanning * Merge Middle and Secondary Button hooks * Make mouse state variables more identifiable.
This commit is contained in:
17
src/modules/fancyzones/FancyZonesLib/MouseButtonsHook.h
Normal file
17
src/modules/fancyzones/FancyZonesLib/MouseButtonsHook.h
Normal file
@@ -0,0 +1,17 @@
|
||||
#pragma once
|
||||
|
||||
#include <functional>
|
||||
|
||||
class MouseButtonsHook
|
||||
{
|
||||
public:
|
||||
MouseButtonsHook(std::function<void()>, std::function<void()>);
|
||||
void enable();
|
||||
void disable();
|
||||
|
||||
private:
|
||||
static HHOOK hHook;
|
||||
static std::function<void()> middleClickCallback;
|
||||
static std::function<void()> secondaryClickCallback;
|
||||
static LRESULT CALLBACK MouseButtonsProc(int, WPARAM, LPARAM);
|
||||
};
|
||||
Reference in New Issue
Block a user