mirror of
https://github.com/microsoft/PowerToys.git
synced 2026-04-06 03:07:04 +02:00
"Unhooked" the Shortcut guide module from the PT event dispatcher (#2318)
* "Unhooked" the Shortcut guide module from the PT event dispatcher * Fixup: warning/undefined behavior/terrible bug * SetWindowsHookEx and UnhookWindowsHookEx now fail silently * Updated a comment in shortcut_guide.h * Renamed a method, added an error message
This commit is contained in:
@@ -22,6 +22,8 @@ public:
|
||||
virtual void enable() override;
|
||||
virtual void disable() override;
|
||||
virtual bool is_enabled() override;
|
||||
|
||||
// PowerToys interface method, not used
|
||||
virtual intptr_t signal_event(const wchar_t* name, intptr_t data) override;
|
||||
|
||||
virtual void register_system_menu_helper(PowertoySystemMenuIface* helper) override {}
|
||||
@@ -32,6 +34,9 @@ public:
|
||||
void quick_hide();
|
||||
void was_hidden();
|
||||
|
||||
// Method called from LowLevelKeyboardProc
|
||||
intptr_t signal_event(LowlevelKeyboardEvent* event);
|
||||
|
||||
virtual void destroy() override;
|
||||
|
||||
private:
|
||||
@@ -39,6 +44,7 @@ private:
|
||||
std::unique_ptr<TargetState> target_state;
|
||||
std::unique_ptr<D2DOverlayWindow> winkey_popup;
|
||||
bool _enabled = false;
|
||||
HHOOK hook_handle;
|
||||
|
||||
void init_settings();
|
||||
void disable(bool trace_event);
|
||||
|
||||
Reference in New Issue
Block a user