summaryrefslogtreecommitdiff
path: root/src/mir_app
diff options
context:
space:
mode:
authorGeorge Hazan <ghazan@miranda.im>2022-03-30 17:55:23 +0300
committerGeorge Hazan <ghazan@miranda.im>2022-03-30 17:55:23 +0300
commit92726664771503f7ea09786401ed0db5f52d4d78 (patch)
treed3bbc602e7c8a3d5970c5a149372912c5a275f2e /src/mir_app
parent3ba7b017ff79f543c1874ed78b2be6a7a16572b1 (diff)
fix for pressing Enter in the middle of SRMM entry field
Diffstat (limited to 'src/mir_app')
-rw-r--r--src/mir_app/src/srmm_base.cpp19
1 files changed, 9 insertions, 10 deletions
diff --git a/src/mir_app/src/srmm_base.cpp b/src/mir_app/src/srmm_base.cpp
index 364d5d6ede..34f00c2d44 100644
--- a/src/mir_app/src/srmm_base.cpp
+++ b/src/mir_app/src/srmm_base.cpp
@@ -182,6 +182,15 @@ LRESULT CSrmmBaseDialog::WndProc_Message(UINT msg, WPARAM wParam, LPARAM lParam)
return 1;
break;
}
+
+ case WM_KEYDOWN:
+ MSG tmp = { m_hwnd, msg, wParam, lParam };
+ if (Hotkey_Check(&tmp, g_pszHotkeySection) == 100) {
+ if (!(GetWindowLongPtr(m_message.GetHwnd(), GWL_STYLE) & ES_READONLY)) {
+ PostMessage(m_hwnd, WM_COMMAND, IDOK, 0);
+ return true;
+ }
+ }
}
LRESULT res = mir_callNextSubclass(m_message.GetHwnd(), stubMessageProc, msg, wParam, lParam);
@@ -204,16 +213,6 @@ LRESULT CSrmmBaseDialog::WndProc_Message(UINT msg, WPARAM wParam, LPARAM lParam)
}
}
- {
- MSG tmp = { m_hwnd, msg, wParam, lParam };
- if (Hotkey_Check(&tmp, g_pszHotkeySection) == 100) {
- if (!(GetWindowLongPtr(m_message.GetHwnd(), GWL_STYLE) & ES_READONLY)) {
- PostMessage(m_hwnd, WM_COMMAND, IDOK, 0);
- return true;
- }
- }
- }
-
__fallthrough;
case WM_SYSKEYDOWN: