emacs-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

master 2bcd299 1/2: Ignore all emulated button events (i.e. those from t


From: Po Lu
Subject: master 2bcd299 1/2: Ignore all emulated button events (i.e. those from touchscreens)
Date: Mon, 20 Dec 2021 20:43:58 -0500 (EST)

branch: master
commit 2bcd299431495e2107df16febf9b207c75fb29fd
Author: Po Lu <luangruo@yahoo.com>
Commit: Po Lu <luangruo@yahoo.com>

    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.
---
 src/xterm.c | 7 ++++---
 1 file changed, 4 insertions(+), 3 deletions(-)

diff --git a/src/xterm.c b/src/xterm.c
index 7456b3b..47539fd 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;



reply via email to

[Prev in Thread] Current Thread [Next in Thread]