emacs-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

?????? ?????? ?????? ?????? ?????? [PATCH] Add IME status change support


From: Albert
Subject: ?????? ?????? ?????? ?????? ?????? [PATCH] Add IME status change support on windows natively
Date: Mon, 13 Apr 2020 17:22:35 +0800

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"<address@hidden>;
????????: 2020??4??13??(??????) ????3:26
??????: "Eli Zaretskii"<address@hidden>;
????: "emacs-devel"<address@hidden>;
????: ?????? ?????? ?????? ?????? ?????? [PATCH] Add IME status change support on windows natively

Hi, Eli,

I can't get the main window handle as emacs doesn't save the main window handle after invoking createWindow(). I just found w32_system_caret_hwnd did work. I will modify the code by using GetFocus().


------------------ ???????? ------------------
??????: "Eli Zaretskii"<address@hidden>;
????????: 2020??4??13??(??????) ????3:21
??????: "Albert"<address@hidden>;
????: "emacs-devel"<address@hidden>;
????: Re: ?????? ?????? ?????? ?????? [PATCH] Add IME status change support on windows natively

> From: "Albert" <address@hidden>
> Cc: "emacs-devel" <address@hidden>
> 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.

Attachment: w32fns.c.patch
Description: Binary data


reply via email to

[Prev in Thread] Current Thread [Next in Thread]