]> git.eshelyaron.com Git - emacs.git/commitdiff
Use more precise test for emulated wheel events in XI2
authorPo Lu <luangruo@yahoo.com>
Mon, 22 Nov 2021 05:24:59 +0000 (13:24 +0800)
committerPo Lu <luangruo@yahoo.com>
Mon, 22 Nov 2021 05:24:59 +0000 (13:24 +0800)
* src/xterm.c (handle_one_xevent): Ignore button events
that have XIPointerEmulated set.

src/xterm.c

index 9d052c412b466428a728a8a770a08ab1c2ff8aef..4e7ecd840ef354845fa2d18aa1e92837af53ee9d 100644 (file)
@@ -10128,11 +10128,15 @@ handle_one_xevent (struct x_display_info *dpyinfo,
              bool tool_bar_p = false;
              struct xi_device_t *device;
 
+#ifdef XIPointerEmulated
              /* Ignore emulated scroll events when XI2 native
                 scroll events are present.  */
-             if (dpyinfo->xi2_version >= 1 && xev->detail >= 4
-                 && xev->detail <= 8)
+             if (dpyinfo->xi2_version >= 1
+                 && xev->detail >= 4
+                 && xev->detail <= 8
+                 && xev->flags & XIPointerEmulated)
                goto XI_OTHER;
+#endif
 
              device = xi_device_from_id (dpyinfo, xev->deviceid);