This doesn't add support for embedded pre-edit because I couldn't immediately get it to appear.
From winex11, calling this should be enough: ``` NtUserPostMessage( hwnd, WM_WINE_IME_NOTIFY, IMN_WINE_SET_OPEN_STATUS, TRUE ); post_ime_update( hwnd, 0, preedit, NULL ); ```
But it also needs to be sequenced correctly with the committed string, I think that as soon as text is committed the completion window will close and needs to be reopened again.
On X11, the pre-edit appears completely separated to the application window and doesn't move with it
Yes, the IME completion window is a win32 window, and its position isn't well synchronized. It could possibly be improved, this lives in `imm32/ime.c`.
If Windows has the surrounding text feature, it does not seem possible to support it here with the provided interface.
I may be wrong but I don't think the imm32 API allows doing something like that on Windows. It's perhaps possible with other APIs like msctf, but that one isn't really implemented in Wine.
If Windows has a facility that applications can use to say that it does or does not accept text entry at certain parts of the UI, it does not seem possible to support it here with the provided interface.
This is something that's done between the application and imm32. Not completely sure we inform the drivers about it, the IME driver integration is complicated, with a lot a impedance mismatch.