Rémi Bernon (@rbernon) commented about dlls/imm32/tests/imm32.c:
ok_ne( NULL, himc, HIMC, "%p" ); ctx = ImmLockIMC( himc ); ok_ne( NULL, ctx, INPUTCONTEXT *, "%p" ); - process_messages(); + flush_events(); memset( ime_calls, 0, sizeof(ime_calls) ); ime_call_count = 0;
```suggestion:-12+0 hwnd = CreateWindowW( test_class.lpszClassName, NULL, WS_OVERLAPPEDWINDOW | WS_VISIBLE, 100, 100, 100, 100, NULL, NULL, NULL, NULL ); ok( !!hwnd, "CreateWindowW failed, error %lu ", GetLastError() ); flush_events(); ok_ret( 1, ImmActivateLayout( hkl ) ); ok_ret( 1, ImmLoadIME( hkl ) ); himc = ImmCreateContext(); ok_ne( NULL, himc, HIMC, "%p" ); ctx = ImmLockIMC( himc ); ok_ne( NULL, ctx, INPUTCONTEXT *, "%p" ); process_messages(); memset( ime_calls, 0, sizeof(ime_calls) ); ime_call_count = 0; ``` I'm not sure why this is needed but it's likely only because the window becomes visible, and may need to wait a bit longer for the X11 driver messages. The rest shouldn't depend on any host messages, so lets keep it separated. -- https://gitlab.winehq.org/wine/wine/-/merge_requests/11193#note_143574