From 003dc93f93994c1fc568a7844623fa65f9d33448 Mon Sep 17 00:00:00 2001 From: Po Lu Date: Sun, 15 May 2022 09:05:41 +0800 Subject: [PATCH] Fix scroll event translation for legacy button events * src/xterm.c (handle_one_xevent): Don't treat emulated Button8 as a wheel event. --- src/xterm.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/xterm.c b/src/xterm.c index c0d2ee40b0f..dbe07a85513 100644 --- a/src/xterm.c +++ b/src/xterm.c @@ -16981,7 +16981,7 @@ handle_one_xevent (struct x_display_info *dpyinfo, f = x_any_window_to_frame (dpyinfo, event->xbutton.window); if (event->xbutton.button > 3 - && event->xbutton.button < 9 + && event->xbutton.button < 8 && f) { if (ignore_next_mouse_click_timeout @@ -18402,7 +18402,7 @@ handle_one_xevent (struct x_display_info *dpyinfo, f = x_any_window_to_frame (dpyinfo, xev->event); - if (xev->detail > 3 && xev->detail < 9 && f) + if (xev->detail > 3 && xev->detail < 8 && f) { if (xev->evtype == XI_ButtonRelease) { @@ -18445,7 +18445,7 @@ handle_one_xevent (struct x_display_info *dpyinfo, if (f) { - if (xev->detail >= 4 && xev->detail <= 8) + if (xev->detail >= 4 && xev->detail < 8) { if (xev->evtype == XI_ButtonRelease) { -- 2.39.2