winex11: Make sure HIMC is opened before sending IME updates.

This commit is contained in:
Rémi Bernon 2023-05-30 13:16:39 +02:00 committed by Alexandre Julliard
parent 97c0a52ae5
commit f7e76184f1

View file

@ -175,6 +175,7 @@ static int xic_preedit_start( XIC xic, XPointer user, XPointer arg )
if ((ime_comp_buf = realloc( ime_comp_buf, sizeof(WCHAR) ))) *ime_comp_buf = 0;
else ERR( "Failed to allocate preedit buffer\n" );
NtUserPostMessage( hwnd, WM_IME_NOTIFY, IMN_WINE_SET_OPEN_STATUS, TRUE );
post_ime_update( hwnd, 0, ime_comp_buf, NULL );
return -1;
@ -190,6 +191,7 @@ static int xic_preedit_done( XIC xic, XPointer user, XPointer arg )
ime_comp_buf = NULL;
post_ime_update( hwnd, 0, NULL, NULL );
NtUserPostMessage( hwnd, WM_IME_NOTIFY, IMN_WINE_SET_OPEN_STATUS, FALSE );
return 0;
}