https://git.reactos.org/?p=reactos.git;a=commitdiff;h=34068456a53047ab3bd97…
commit 34068456a53047ab3bd97b8851a5d35a445a31d0
Author: Katayama Hirofumi MZ <katayama.hirofumi.mz(a)gmail.com>
AuthorDate: Thu Dec 21 20:24:44 2023 +0900
Commit: GitHub <noreply(a)github.com>
CommitDate: Thu Dec 21 20:24:44 2023 +0900
[COMCTL32][USER32] EDIT control: Check bCaptureState on WM_CHAR (#6206)
Based on KRosUser's edit_v2.patch.
Edit control should stop processing
characters when left mouse button
is down.
If es->bCaptureState is set, then
ignore WM_CHAR message.
CORE-10259
---
dll/win32/comctl32/edit.c | 5 +++++
win32ss/user/user32/controls/edit.c | 5 +++++
2 files changed, 10 insertions(+)
diff --git a/dll/win32/comctl32/edit.c b/dll/win32/comctl32/edit.c
index d17c7f20d30..67edb6b3e3f 100644
--- a/dll/win32/comctl32/edit.c
+++ b/dll/win32/comctl32/edit.c
@@ -3051,6 +3051,11 @@ static LRESULT EDIT_WM_Char(EDITSTATE *es, WCHAR c)
{
BOOL control;
+#ifdef __REACTOS__
+ if (es->bCaptureState)
+ return 0;
+#endif
+
control = GetKeyState(VK_CONTROL) & 0x8000;
switch (c) {
diff --git a/win32ss/user/user32/controls/edit.c b/win32ss/user/user32/controls/edit.c
index bfe910c8cde..21d2c24c64c 100644
--- a/win32ss/user/user32/controls/edit.c
+++ b/win32ss/user/user32/controls/edit.c
@@ -3286,6 +3286,11 @@ static LRESULT EDIT_WM_Char(EDITSTATE *es, WCHAR c)
{
BOOL control;
+#ifdef __REACTOS__
+ if (es->bCaptureState)
+ return 0;
+#endif
+
control = GetKeyState(VK_CONTROL) & 0x8000;
switch (c) {