From 16e4c34d696a2602a157da6ee7e04ab8211a0aa9 Mon Sep 17 00:00:00 2001 From: Andrey Nekrasov Date: Tue, 29 Dec 2020 19:20:12 +0300 Subject: [PATCH] FZ: fix currently selected zone tracking (#8797) --- src/modules/fancyzones/dll/dllmain.cpp | 6 +++--- src/modules/fancyzones/lib/GenericKeyHook.h | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/modules/fancyzones/dll/dllmain.cpp b/src/modules/fancyzones/dll/dllmain.cpp index 43f5c5e8ce..c38684d00b 100644 --- a/src/modules/fancyzones/dll/dllmain.cpp +++ b/src/modules/fancyzones/dll/dllmain.cpp @@ -210,11 +210,11 @@ private: //contains the non localized key of the powertoy std::wstring app_key; - static inline FancyZonesModule* s_instance; - static inline HHOOK s_llKeyboardHook; + static inline FancyZonesModule* s_instance = nullptr; + static inline HHOOK s_llKeyboardHook = nullptr; std::vector m_staticWinEventHooks; - HWINEVENTHOOK m_objectLocationWinEventHook; + HWINEVENTHOOK m_objectLocationWinEventHook = nullptr; static LRESULT CALLBACK LowLevelKeyboardProc(int nCode, WPARAM wParam, LPARAM lParam) { diff --git a/src/modules/fancyzones/lib/GenericKeyHook.h b/src/modules/fancyzones/lib/GenericKeyHook.h index 361d77060e..76716ca407 100644 --- a/src/modules/fancyzones/lib/GenericKeyHook.h +++ b/src/modules/fancyzones/lib/GenericKeyHook.h @@ -39,7 +39,7 @@ public: } private: - inline static HHOOK hHook; + inline static HHOOK hHook = nullptr; inline static std::function callback; static LRESULT CALLBACK GenericKeyHookProc(int nCode, WPARAM wParam, LPARAM lParam)