aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorPo Lu2022-01-06 19:11:56 +0800
committerPo Lu2022-01-06 19:11:56 +0800
commit9fc20ad35c8dd1814ba097a0ec20c0230c467729 (patch)
treeb9d52528fbed9500e974292304b325b714711e54 /src
parent2ab73286b7a58eb983da21bca8b781ec884eb996 (diff)
downloademacs-9fc20ad35c8dd1814ba097a0ec20c0230c467729.tar.gz
emacs-9fc20ad35c8dd1814ba097a0ec20c0230c467729.zip
Make sure touch end events aren't sent too many times
* src/xterm.c (handle_one_xevent): Don't send touch end events twice if two valuators have their masks set without a change in value.
Diffstat (limited to 'src')
-rw-r--r--src/xterm.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/src/xterm.c b/src/xterm.c
index ff6c71283ec..1d4c775753c 100644
--- a/src/xterm.c
+++ b/src/xterm.c
@@ -10156,6 +10156,7 @@ handle_one_xevent (struct x_display_info *dpyinfo,
10156 case XI_Motion: 10156 case XI_Motion:
10157 { 10157 {
10158 struct xi_device_t *device; 10158 struct xi_device_t *device;
10159 bool touch_end_event_seen = false;
10159 10160
10160 states = &xev->valuators; 10161 states = &xev->valuators;
10161 values = states->values; 10162 values = states->values;
@@ -10294,7 +10295,12 @@ handle_one_xevent (struct x_display_info *dpyinfo,
10294 inev.ie.arg = Qnil; 10295 inev.ie.arg = Qnil;
10295 } 10296 }
10296 10297
10297 kbd_buffer_store_event_hold (&inev.ie, hold_quit); 10298 if (inev.ie.kind != TOUCH_END_EVENT
10299 || !touch_end_event_seen)
10300 {
10301 kbd_buffer_store_event_hold (&inev.ie, hold_quit);
10302 touch_end_event_seen = inev.ie.kind == TOUCH_END_EVENT;
10303 }
10298 10304
10299 val->emacs_value = 0; 10305 val->emacs_value = 0;
10300 } 10306 }