summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGeorge Hazan <ghazan@miranda.im>2022-01-27 20:36:27 +0300
committerGeorge Hazan <ghazan@miranda.im>2022-01-27 20:36:27 +0300
commit708ba22a8884612a27639b8ff1591df763965c21 (patch)
tree5e8cedf1891f806734b6645f24f34db5ef789f78
parent81ccc3118d53a2e09e64ce4b750cf9dd7cbc9b5a (diff)
fixes #3011 (Core: убрать возможность назначить один хоткей на два разных действия)
-rw-r--r--src/mir_app/src/hotkeys.cpp5
1 files changed, 2 insertions, 3 deletions
diff --git a/src/mir_app/src/hotkeys.cpp b/src/mir_app/src/hotkeys.cpp
index fecddead47..8400697910 100644
--- a/src/mir_app/src/hotkeys.cpp
+++ b/src/mir_app/src/hotkeys.cpp
@@ -69,7 +69,7 @@ static void sttWordToModAndVk(uint16_t w, uint8_t *mod, uint8_t *vk)
static LRESULT CALLBACK sttHotkeyHostWndProc(HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam)
{
- if (msg == WM_HOTKEY) {
+ if (msg == WM_HOTKEY && g_hwndHkOptions == nullptr) {
for (auto &p : hotkeys) {
if (p->type != HKT_GLOBAL || !p->Enabled)
continue;
@@ -88,9 +88,8 @@ static LRESULT CALLBACK sttHotkeyHostWndProc(HWND hwnd, UINT msg, WPARAM wParam,
static LRESULT CALLBACK sttKeyboardProc(int code, WPARAM wParam, LPARAM lParam)
{
- if (code == HC_ACTION && !(HIWORD(lParam) & KF_UP)) {
+ if (code == HC_ACTION && !(HIWORD(lParam) & KF_UP) && g_hwndHkOptions == nullptr) {
uint8_t mod = 0, vk = wParam;
-
if (vk) {
if (GetAsyncKeyState(VK_CONTROL)) mod |= MOD_CONTROL;
if (GetAsyncKeyState(VK_MENU)) mod |= MOD_ALT;