summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPo Lu <luangruo@yahoo.com>2021-12-21 09:41:40 +0800
committerPo Lu <luangruo@yahoo.com>2021-12-21 09:41:40 +0800
commit2bcd299431495e2107df16febf9b207c75fb29fd (patch)
tree0e4eb9fbf42e55168395ec59d3a637837bb1230b
parentaa1fdb3f6fe08169143a3062ca257be487713531 (diff)
downloademacs-2bcd299431495e2107df16febf9b207c75fb29fd.tar.gz
Ignore all emulated button events (i.e. those from touchscreens)
* src/xterm.c (handle_one_xevent): Ignore all XIPointerEmulated events if the display supports XI 2.2 or later.
-rw-r--r--src/xterm.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/src/xterm.c b/src/xterm.c
index 7456b3b6beb..47539fdef5d 100644
--- a/src/xterm.c
+++ b/src/xterm.c
@@ -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;