From: Po Lu Date: Mon, 11 Apr 2022 01:16:22 +0000 (+0800) Subject: * src/xterm.c (handle_one_event): Make event attribution more accurate. X-Git-Tag: emacs-29.0.90~1931^2~668 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=bdd7cd0d2ee006e95b10ef12151a5ff1bb4f8abd;p=emacs.git * src/xterm.c (handle_one_event): Make event attribution more accurate. --- diff --git a/src/xterm.c b/src/xterm.c index 88122416e27..94cfe63ba0c 100644 --- a/src/xterm.c +++ b/src/xterm.c @@ -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);