From: Po Lu Date: Fri, 24 Dec 2021 01:20:44 +0000 (+0800) Subject: Drop scrollbar motion events when valuators are found X-Git-Tag: emacs-29.0.90~3484 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=20647467bef593c9dd3b86efdc6f21ddfd1e7f75;p=emacs.git 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. --- 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);