]> git.eshelyaron.com Git - emacs.git/commitdiff
Also filter XI_KeyRelease events
authorPo Lu <luangruo@yahoo.com>
Mon, 22 Nov 2021 01:40:47 +0000 (09:40 +0800)
committerPo Lu <luangruo@yahoo.com>
Mon, 22 Nov 2021 01:40:47 +0000 (09:40 +0800)
* src/xterm.c (handle_one_xevent): Also filter XI_KeyRelease
events through the X input method.

src/xterm.c

index 7c2276f2e6c9571a3ee9a5df300740ac5f2b6126..9d052c412b466428a728a8a770a08ab1c2ff8aef 100644 (file)
@@ -10649,6 +10649,25 @@ handle_one_xevent (struct x_display_info *dpyinfo,
            }
          case XI_KeyRelease:
            x_display_set_last_user_time (dpyinfo, xev->time);
+#ifdef HAVE_X_I18N
+           XKeyPressedEvent xkey;
+
+           memset (&xkey, 0, sizeof xkey);
+
+           xkey.type = KeyRelease;
+           xkey.serial = 0;
+           xkey.send_event = xev->send_event;
+           xkey.display = xev->display;
+           xkey.window = xev->event;
+           xkey.root = xev->root;
+           xkey.subwindow = xev->child;
+           xkey.time = xev->time;
+           xkey.state = xev->mods.effective;
+           xkey.keycode = xev->detail;
+           xkey.same_screen = True;
+
+           x_filter_event (dpyinfo, (XEvent *) &xkey);
+#endif
            goto XI_OTHER;
          case XI_PropertyEvent:
          case XI_HierarchyChanged: