]> git.eshelyaron.com Git - emacs.git/commitdiff
Drop scrollbar motion events when valuators are found
authorPo Lu <luangruo@yahoo.com>
Fri, 24 Dec 2021 01:20:44 +0000 (09:20 +0800)
committerPo Lu <luangruo@yahoo.com>
Fri, 24 Dec 2021 01:20:44 +0000 (09:20 +0800)
* 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

index 070ee7d671eaab99f63ebbcd4e2bdf9d95bfd245..c5f826433f1f261fe2b0c99c4b52235a3edb513b 100644 (file)
@@ -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);