> From: "Albert" > Cc: "emacs-devel" > Date: Mon, 13 Apr 2020 15:07:19 +0800 > > Thanks. I'll try it. I'm also worried by your use of w32_system_caret_hwnd as the handle of the window for which to retrieve the input context. w32_system_caret_hwnd is not guaranteed to be a valid handle if the system caret is not used, i.e. if w32-use-visible-system-caret is nil (which is the default). So perhaps instead of using w32_system_caret_hwnd, you should use the return value of GetFocus function, similar to what we do elsewhere in w32_msg_pump.