From: Po Lu Date: Mon, 22 Nov 2021 05:24:59 +0000 (+0800) Subject: Use more precise test for emulated wheel events in XI2 X-Git-Tag: emacs-29.0.90~2852^2~118 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=5fcff0d2cbe33faef8bbb753a5f02fb26b1d7e5c;p=emacs.git Use more precise test for emulated wheel events in XI2 * src/xterm.c (handle_one_xevent): Ignore button events that have XIPointerEmulated set. --- 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, 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);