Fix previous change in w32fns.c

* src/w32fns.c (w32_msg_pump): Simplify by not calling
ImmGetOpenStatus.
(Fw32_get_ime_open_status): Fix a typo.
This commit is contained in:
Albert 2020-04-13 22:52:30 +08:00 committed by Eli Zaretskii
parent fc336a4655
commit 9c6392c358

View file

@ -3459,10 +3459,7 @@ w32_msg_pump (deferred_msg * msg_buf)
if (!context)
break;
BOOL new_status = (msg.wParam != 0);
BOOL ime_status = get_ime_open_status_fn (context);
if (new_status != ime_status)
set_ime_open_status_fn (context, new_status);
set_ime_open_status_fn (context, msg.wParam != 0);
release_ime_context_fn (focus_window, context);
break;
}
@ -10261,7 +10258,7 @@ This function returns non-nil if the IME is active, otherwise nil. */)
{
HWND current_window = FRAME_W32_WINDOW (sf);
HIMC context = get_ime_context_fn (current_window);
if (!context)
if (context)
{
BOOL retval = get_ime_open_status_fn (context);
release_ime_context_fn (current_window, context);