Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=56108
-- v2: comctl32/edit: Block key input when mouse input is captured. user32/edit: Block key input when mouse input is captured.
From: Nikolay Sivov nsivov@codeweavers.com
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=56108 --- dlls/user32/edit.c | 6 ++++++ 1 file changed, 6 insertions(+)
diff --git a/dlls/user32/edit.c b/dlls/user32/edit.c index 4c300730acb..24c5e837d87 100644 --- a/dlls/user32/edit.c +++ b/dlls/user32/edit.c @@ -3178,6 +3178,9 @@ static LRESULT EDIT_WM_Char(EDITSTATE *es, WCHAR c) { BOOL control;
+ if (es->bCaptureState) + return 1; + control = NtUserGetKeyState(VK_CONTROL) & 0x8000;
switch (c) { @@ -3450,6 +3453,9 @@ static LRESULT EDIT_WM_KeyDown(EDITSTATE *es, INT key) BOOL shift; BOOL control;
+ if (es->bCaptureState) + return 1; + if (NtUserGetKeyState(VK_MENU) & 0x8000) return 0;
From: Nikolay Sivov nsivov@codeweavers.com
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=56108 Signed-off-by: Nikolay Sivov nsivov@codeweavers.com --- dlls/comctl32/edit.c | 6 ++++++ 1 file changed, 6 insertions(+)
diff --git a/dlls/comctl32/edit.c b/dlls/comctl32/edit.c index e57f3d328d1..3fe84816141 100644 --- a/dlls/comctl32/edit.c +++ b/dlls/comctl32/edit.c @@ -3028,6 +3028,9 @@ static LRESULT EDIT_WM_Char(EDITSTATE *es, WCHAR c) { BOOL control;
+ if (es->bCaptureState) + return 1; + control = GetKeyState(VK_CONTROL) & 0x8000;
switch (c) { @@ -3284,6 +3287,9 @@ static LRESULT EDIT_WM_KeyDown(EDITSTATE *es, INT key) BOOL shift; BOOL control;
+ if (es->bCaptureState) + return 1; + if (GetKeyState(VK_MENU) & 0x8000) return 0;
On Tue Mar 18 18:14:35 2025 +0000, Nikolay Sivov wrote:
changed this line in [version 2 of the diff](/wine/wine/-/merge_requests/7606/diffs?diff_id=164924&start_sha=d07f9aed52296b3ae1afa2c9f8c2e7fe565c1e83#4f6a0758bbda94e7bd8d914d4e374097a04db655_3032_3032)
Thanks, pushed.
This merge request was approved by Zhiyi Zhang.