Rémi Bernon (@rbernon) commented about dlls/winewayland.drv/wayland_text_input.c:
struct wayland_text_input *text_input = data;
HWND hwnd; TRACE("data %p, text_input %p, surface %p.\n", data, zwp_text_input_v3, surface);
pthread_mutex_lock(&text_input->mutex); zwp_text_input_v3_disable(text_input->zwp_text_input_v3); zwp_text_input_v3_commit(text_input->zwp_text_input_v3); text_input->serial++;
if (text_input->preedit_started)
{
assert(text_input->wl_surface);
hwnd = wl_surface_get_user_data(text_input->wl_surface);
post_ime_update(hwnd, 0, NULL, NULL);
NtUserPostMessage(hwnd, WM_WINE_IME_NOTIFY, IMN_WINE_SET_OPEN_STATUS, FALSE);
text_input->preedit_started = FALSE;
}
Do we need this? Isn't `text_input_done` always guaranteed to be called?