aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorPo Lu2022-02-22 14:01:31 +0800
committerPo Lu2022-02-22 14:02:41 +0800
commit6d060a38ec46db05598d38e577980ec8dbf7b691 (patch)
treee3e242cf368f3c6fd3b006d9e1248b63acb46812 /src
parentbee54495e92ddf5d75e3f68ac7e823b221306719 (diff)
downloademacs-6d060a38ec46db05598d38e577980ec8dbf7b691.tar.gz
emacs-6d060a38ec46db05598d38e577980ec8dbf7b691.zip
Always send wheel events on XI2
* src/xterm.c (handle_one_xevent): Send emulated button events as wheel events when handling XI2 button events.
Diffstat (limited to 'src')
-rw-r--r--src/xterm.c22
1 files changed, 22 insertions, 0 deletions
diff --git a/src/xterm.c b/src/xterm.c
index 6efefd0301d..629a098b553 100644
--- a/src/xterm.c
+++ b/src/xterm.c
@@ -11391,6 +11391,28 @@ handle_one_xevent (struct x_display_info *dpyinfo,
11391 11391
11392 if (f) 11392 if (f)
11393 { 11393 {
11394 if (xev->detail >= 4 && xev->detail <= 8)
11395 {
11396 if (xev->detail <= 5)
11397 inev.ie.kind = WHEEL_EVENT;
11398 else
11399 inev.ie.kind = HORIZ_WHEEL_EVENT;
11400
11401 inev.ie.timestamp = xev->time;
11402
11403 XSETINT (inev.ie.x, lrint (xev->event_x));
11404 XSETINT (inev.ie.y, lrint (xev->event_y));
11405 XSETFRAME (inev.ie.frame_or_window, f);
11406
11407 inev.ie.modifiers
11408 |= x_x_to_emacs_modifiers (dpyinfo,
11409 xev->mods.effective);
11410
11411 inev.ie.modifiers |= xev->detail % 2 ? down_modifier : up_modifier;
11412
11413 goto XI_OTHER;
11414 }
11415
11394 /* Is this in the tab-bar? */ 11416 /* Is this in the tab-bar? */
11395 if (WINDOWP (f->tab_bar_window) 11417 if (WINDOWP (f->tab_bar_window)
11396 && WINDOW_TOTAL_LINES (XWINDOW (f->tab_bar_window))) 11418 && WINDOW_TOTAL_LINES (XWINDOW (f->tab_bar_window)))