From a6952f78f3962ac2d9a5add580a130f0abd31429 Mon Sep 17 00:00:00 2001 From: Po Lu Date: Sun, 2 Jan 2022 11:02:02 +0800 Subject: [PATCH] Stop sending touch-end events if coalescing scroll events * src/xterm.c (handle_one_xevent): Don't generate touch-end events if mwheel_coalesce_scroll_events is non-nil. --- src/xterm.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/xterm.c b/src/xterm.c index 3c35c275baf..c3443317559 100644 --- a/src/xterm.c +++ b/src/xterm.c @@ -10173,12 +10173,12 @@ handle_one_xevent (struct x_display_info *dpyinfo, val->emacs_value += delta; if (mwheel_coalesce_scroll_events - && (fabs (val->emacs_value) < 1) - && (fabs (delta) > 0)) + && (fabs (val->emacs_value) < 1)) continue; bool s = signbit (val->emacs_value); - inev.ie.kind = (fabs (delta) > 0 + inev.ie.kind = ((mwheel_coalesce_scroll_events + || fabs (delta) > 0) ? (val->horizontal ? HORIZ_WHEEL_EVENT : WHEEL_EVENT) -- 2.39.2