Module: wine Branch: master Commit: 6fd3bd9b62f405a54db29dc5a72805063a6099ca URL: https://gitlab.winehq.org/wine/wine/-/commit/6fd3bd9b62f405a54db29dc5a728050...
Author: Rémi Bernon rbernon@codeweavers.com Date: Tue Mar 28 12:34:27 2023 +0200
win32u: Ignore IME messages from IME UI windows in DefWindowProc.
---
dlls/imm32/tests/imm32.c | 4 ---- dlls/win32u/defwnd.c | 2 +- 2 files changed, 1 insertion(+), 5 deletions(-)
diff --git a/dlls/imm32/tests/imm32.c b/dlls/imm32/tests/imm32.c index 30457c95d8e..f4056914d04 100644 --- a/dlls/imm32/tests/imm32.c +++ b/dlls/imm32/tests/imm32.c @@ -2505,7 +2505,6 @@ static WCHAR ime_path[MAX_PATH]; static HIMC default_himc; static HKL default_hkl; static HKL expect_ime = (HKL)(int)0xe020047f; -static BOOL skip_DefWindowProc;
enum ime_function { @@ -2704,7 +2703,6 @@ static LRESULT CALLBACK ime_ui_window_proc( HWND hwnd, UINT msg, WPARAM wparam, ok( !ptr, "got IMMGWL_PRIVATE %#Ix\n", ptr );
ime_calls[ime_call_count++] = call; - if (skip_DefWindowProc) return 0; return DefWindowProcW( hwnd, msg, wparam, lparam ); }
@@ -4431,7 +4429,6 @@ static void test_DefWindowProc(void) memset( ime_calls, 0, sizeof(ime_calls) ); ime_call_count = 0;
- skip_DefWindowProc = TRUE; ok_ret( 0, DefWindowProcW( hwnd, WM_IME_STARTCOMPOSITION, 0, 0 ) ); ok_seq( start_composition_seq ); ok_ret( 0, DefWindowProcW( hwnd, WM_IME_ENDCOMPOSITION, 0, 0 ) ); @@ -4462,7 +4459,6 @@ static void test_DefWindowProc(void) todo_wine ok_ret( 0, ret ); ok_seq( empty_sequence ); - skip_DefWindowProc = FALSE;
ok_ret( 1, ImmActivateLayout( old_hkl ) ); ok_ret( 1, DestroyWindow( hwnd ) ); diff --git a/dlls/win32u/defwnd.c b/dlls/win32u/defwnd.c index 182703e22be..53292c835fd 100644 --- a/dlls/win32u/defwnd.c +++ b/dlls/win32u/defwnd.c @@ -2927,7 +2927,7 @@ LRESULT default_window_proc( HWND hwnd, UINT msg, WPARAM wparam, LPARAM lparam, case WM_IME_CONTROL: { HWND ime_hwnd = get_default_ime_window( hwnd ); - if (ime_hwnd) + if (ime_hwnd && ime_hwnd != NtUserGetParent( hwnd )) result = NtUserMessageCall( ime_hwnd, msg, wparam, lparam, 0, NtUserSendMessage, ansi ); }