]> git.eshelyaron.com Git - emacs.git/commitdiff
Fix previous change in w32fns.c
authorAlbert <georgealbert@qq.com>
Mon, 13 Apr 2020 14:52:30 +0000 (22:52 +0800)
committerEli Zaretskii <eliz@gnu.org>
Mon, 13 Apr 2020 15:31:35 +0000 (18:31 +0300)
* src/w32fns.c (w32_msg_pump): Simplify by not calling
ImmGetOpenStatus.
(Fw32_get_ime_open_status): Fix a typo.

src/w32fns.c

index dddf3dc57191d794a74a449c755d396e208971ae..4f7cbed249d70c9c23d4dc794a79ffd9c72c717e 100644 (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);