]> git.eshelyaron.com Git - emacs.git/commitdiff
Ignore all emulated button events (i.e. those from touchscreens)
authorPo Lu <luangruo@yahoo.com>
Tue, 21 Dec 2021 01:41:40 +0000 (09:41 +0800)
committerPo Lu <luangruo@yahoo.com>
Tue, 21 Dec 2021 01:41:40 +0000 (09:41 +0800)
* src/xterm.c (handle_one_xevent): Ignore all XIPointerEmulated
events if the display supports XI 2.2 or later.

src/xterm.c

index 7456b3b6beb5545f2ceee3b70040054ef2bef4f6..47539fdef5d9a77b83249984c7ca6594d3319d15 100644 (file)
@@ -10329,9 +10329,10 @@ handle_one_xevent (struct x_display_info *dpyinfo,
 #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)
+                  || (dpyinfo->xi2_version >= 2))
                  && xev->flags & XIPointerEmulated)
                {
                  *finish = X_EVENT_DROP;