]> git.eshelyaron.com Git - emacs.git/commitdiff
* src/xterm.c (handle_one_event): Make event attribution more accurate.
authorPo Lu <luangruo@yahoo.com>
Mon, 11 Apr 2022 01:16:22 +0000 (09:16 +0800)
committerPo Lu <luangruo@yahoo.com>
Mon, 11 Apr 2022 01:16:22 +0000 (09:16 +0800)
src/xterm.c

index 88122416e27b198290e5049ba5628426cabbb1f9..94cfe63ba0cae62cf36ac1c5d61f3d72c60610ff 100644 (file)
@@ -14818,7 +14818,12 @@ handle_one_xevent (struct x_display_info *dpyinfo,
                                    Qcoding, coding, inev.ie.arg);
 
 #ifdef HAVE_XINPUT2
-               if (event->xkey.time == pending_keystroke_time)
+               if (event->xkey.time == pending_keystroke_time
+                   /* I-Bus sometimes sends events generated from
+                      multiple filtered keystrokes with a time of 0,
+                      so just use the recorded source device if it
+                      exists.  */
+                   || (pending_keystroke_time && !event->xkey.time))
                  {
                    source = xi_device_from_id (dpyinfo,
                                                dpyinfo->pending_keystroke_source);