Hi, Eli, I modifed the code following your instruction.  I added some more comments on functions. Test is done, IME status changes as expected. I used GetFocus() in w32_msg_pump() now. But I can't invoke GetFocus() in w32-get-ime-open-status(), because w32-get-ime-open-status() is invoked in lisp thread. I just use w32_system_caret_hwnd instead, if get_ime_context_fn(w32-get-ime-open-status) returns NULL, w32-get-ime-open-status() return nil. Attachement is the modifed patch. ------------------ 原始邮件 ------------------ 发件人: "Albert"