Rémi Bernon (@rbernon) commented about dlls/imm32/ime.c:
if (!(compstr = ImmLockIMCC( ctx->hCompStr ))) goto done; size = max( compstr->dwSize, sizeof(COMPOSITIONSTRING) );
+ status = NtUserMessageCall( ctx->hWnd, WINE_IME_TO_ASCII_EX_USER, vkey, vsc, ¶ms, + NtUserImeDriverCall, FALSE ); + + if (!NT_SUCCESS(status)) + { + TRANSMSG msg = {.message = vsc & KF_UP ? WM_KEYUP : WM_KEYDOWN, .wParam = vkey, .lParam = vsc}; + msgs->TransMsg[count++] = msg; + ImmUnlockIMCC( ctx->hCompStr ); + goto done; + }
Could we just merge this call with the loop below, so that if we could hope to get it all done in a single unix call? If we want to avoid processing the key again in the loop, we can just add a flag to the parameters (it could be for instance the previously returned status), and check on the unix side whether the call is the first, or an extra call to get updates with reallocated buffer. -- https://gitlab.winehq.org/wine/wine/-/merge_requests/9992#note_136045