aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorPo Lu2021-11-22 13:24:59 +0800
committerPo Lu2021-11-22 13:24:59 +0800
commit5fcff0d2cbe33faef8bbb753a5f02fb26b1d7e5c (patch)
treedb7b3906e9bd0927ec4a6895812845bcbd274f0e /src
parent9324efac480df3cd78af112da2b12a0d2bd18e02 (diff)
downloademacs-5fcff0d2cbe33faef8bbb753a5f02fb26b1d7e5c.tar.gz
emacs-5fcff0d2cbe33faef8bbb753a5f02fb26b1d7e5c.zip
Use more precise test for emulated wheel events in XI2
* src/xterm.c (handle_one_xevent): Ignore button events that have XIPointerEmulated set.
Diffstat (limited to 'src')
-rw-r--r--src/xterm.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/src/xterm.c b/src/xterm.c
index 9d052c412b4..4e7ecd840ef 100644
--- a/src/xterm.c
+++ b/src/xterm.c
@@ -10128,11 +10128,15 @@ handle_one_xevent (struct x_display_info *dpyinfo,
10128 bool tool_bar_p = false; 10128 bool tool_bar_p = false;
10129 struct xi_device_t *device; 10129 struct xi_device_t *device;
10130 10130
10131#ifdef XIPointerEmulated
10131 /* Ignore emulated scroll events when XI2 native 10132 /* Ignore emulated scroll events when XI2 native
10132 scroll events are present. */ 10133 scroll events are present. */
10133 if (dpyinfo->xi2_version >= 1 && xev->detail >= 4 10134 if (dpyinfo->xi2_version >= 1
10134 && xev->detail <= 8) 10135 && xev->detail >= 4
10136 && xev->detail <= 8
10137 && xev->flags & XIPointerEmulated)
10135 goto XI_OTHER; 10138 goto XI_OTHER;
10139#endif
10136 10140
10137 device = xi_device_from_id (dpyinfo, xev->deviceid); 10141 device = xi_device_from_id (dpyinfo, xev->deviceid);
10138 10142