diff options
| author | Po Lu | 2022-04-11 09:16:22 +0800 |
|---|---|---|
| committer | Po Lu | 2022-04-11 09:16:22 +0800 |
| commit | bdd7cd0d2ee006e95b10ef12151a5ff1bb4f8abd (patch) | |
| tree | f2123c34bd5e45a46ec5ad0a75d2842bb0d5ff1f /src | |
| parent | 48cb9c4aaadfe7bd50c13f658a6e8e9e97587867 (diff) | |
| download | emacs-bdd7cd0d2ee006e95b10ef12151a5ff1bb4f8abd.tar.gz emacs-bdd7cd0d2ee006e95b10ef12151a5ff1bb4f8abd.zip | |
* src/xterm.c (handle_one_event): Make event attribution more accurate.
Diffstat (limited to 'src')
| -rw-r--r-- | src/xterm.c | 7 |
1 files changed, 6 insertions, 1 deletions
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, | |||
| 14818 | Qcoding, coding, inev.ie.arg); | 14818 | Qcoding, coding, inev.ie.arg); |
| 14819 | 14819 | ||
| 14820 | #ifdef HAVE_XINPUT2 | 14820 | #ifdef HAVE_XINPUT2 |
| 14821 | if (event->xkey.time == pending_keystroke_time) | 14821 | if (event->xkey.time == pending_keystroke_time |
| 14822 | /* I-Bus sometimes sends events generated from | ||
| 14823 | multiple filtered keystrokes with a time of 0, | ||
| 14824 | so just use the recorded source device if it | ||
| 14825 | exists. */ | ||
| 14826 | || (pending_keystroke_time && !event->xkey.time)) | ||
| 14822 | { | 14827 | { |
| 14823 | source = xi_device_from_id (dpyinfo, | 14828 | source = xi_device_from_id (dpyinfo, |
| 14824 | dpyinfo->pending_keystroke_source); | 14829 | dpyinfo->pending_keystroke_source); |