In CEF-based applications, ime_ui_update_window may be called from a different thread or process than the UI thread owning the input context. Directly modifying ctx->hWnd in such cases breaks the association between the HIMC handle and its window, which causes subsequent composition string retrieval (CompStr) to fail.
This change restricts ctx->hWnd updates to the UI thread to keep the input context consistent across threads and processes.