From 20647467bef593c9dd3b86efdc6f21ddfd1e7f75 Mon Sep 17 00:00:00 2001 From: Po Lu Date: Fri, 24 Dec 2021 09:20:44 +0800 Subject: [PATCH] Drop scrollbar motion events when valuators are found * src/xterm.c (handle_one_xevent): Drop XI_Motion if it's on top of a scroll bar and a valuator is found. --- src/xterm.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/src/xterm.c b/src/xterm.c index 070ee7d671e..c5f826433f1 100644 --- a/src/xterm.c +++ b/src/xterm.c @@ -10230,7 +10230,13 @@ handle_one_xevent (struct x_display_info *dpyinfo, } #endif if (found_valuator) - goto XI_OTHER; + { +#ifdef USE_GTK + if (f && xg_event_is_for_scrollbar (f, event)) + *finish = X_EVENT_DROP; +#endif + goto XI_OTHER; + } ev.x = lrint (xev->event_x); ev.y = lrint (xev->event_y); -- 2.39.2