On Thu Oct 23 19:04:18 2025 +0000, Byeongsik Jeon wrote:
Wow! Honestly, I had the same idea, but I didn't know about OnMainThread. Since it makes ime processing responsiveness so much better, I hope it continues. When commandDone is set to TRUE in doCommandBySelector:, macdrv_ime_process_key returns FALSE even if NSTextInputContext::handleEvent's return value is TRUE. This is necessary so that the key_assumed value is set correctly in win32u's ime_driver_call and the WM_IME_KEYDOWN message is generated. Modifications are needed for completeText:, setMarkedText:. Currently, after macdrv_ImeProcessKey returns, macdrv_im_set_text is called. IM_SET_TEXT is also unnecessary. When I tested it before, completeText:, setMarkedText: were called before NSTextInputContext::handleEvent returned. I looked inside the OnMainThread, and perhaps there might be an error in my reply. I'll describe the problematic situation:
1. Add the Korean keyboard ‘Korean 2-Set Keyboard’. 1. Run notepad. 1. Move focus to notepad. 1. Select ‘Korean 2-Set Keyboard’. 1. Currently, since comctl32 edit control does not handle WM_INPUTLANGCHANGE, move focus to another window and then focus back to notepad. 1. Type ‘r’ key. 1. Type ‘RETURN’ key. 1. The order of ‘ㄱ’ and ‘RETURN’ gets reversed. -- https://gitlab.winehq.org/wine/wine/-/merge_requests/9260#note_119494