Rémi Bernon (@rbernon) commented about dlls/winemac.drv/keyboard.c:
- while (!done) NtUserMsgWaitForMultipleObjectsEx(0, NULL, INFINITE, QS_POSTMESSAGE | QS_SENDMESSAGE, 0); + if (!thread_data->ime_done_event) + { + NTSTATUS status; + status = NtCreateEvent(&thread_data->ime_done_event, EVENT_ALL_ACCESS, NULL, + SynchronizationEvent, FALSE); + if (status != STATUS_SUCCESS) WARN("NtCreateEvent call failed.\n"); + } + + macdrv_ime_process_key(keyc, flags, repeat, himc, &done, thread_data->ime_done_event); + + if (!thread_data->ime_done_event) + while (!done) NtUserMsgWaitForMultipleObjectsEx(0, NULL, 0, 0, 0); + else + NtUserMsgWaitForMultipleObjectsEx(1, &thread_data->ime_done_event, INFINITE, 0, 0);
I don't think we really need to worry about the event failing to be created, the wait won't work otherwise anyway. ```suggestion:-4+0 NtUserMsgWaitForMultipleObjectsEx(1, &thread_data->ime_done_event, INFINITE, 0, 0); ``` -- https://gitlab.winehq.org/wine/wine/-/merge_requests/9246#note_119277