aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorPo Lu2021-12-29 13:30:46 +0800
committerPo Lu2021-12-29 13:30:46 +0800
commit8419011cebc25efda0e130e9734bf4f5106e651e (patch)
tree6ed28e3bdf096decf1854eeb98095d6977a5814d /src
parent42ede97016e82c86460b2a20cadeb4e8e6ebea7a (diff)
downloademacs-8419011cebc25efda0e130e9734bf4f5106e651e.tar.gz
emacs-8419011cebc25efda0e130e9734bf4f5106e651e.zip
Translate buttons when sending XI2 motion events to xwidgets
* src/xterm.c (handle_one_xevent): Translate all three buttons when passing XI2 motion events to xwidgets.
Diffstat (limited to 'src')
-rw-r--r--src/xterm.c16
1 files changed, 14 insertions, 2 deletions
diff --git a/src/xterm.c b/src/xterm.c
index 3200e44a872..a986681ab77 100644
--- a/src/xterm.c
+++ b/src/xterm.c
@@ -10210,13 +10210,25 @@ handle_one_xevent (struct x_display_info *dpyinfo,
10210#ifdef HAVE_XWIDGETS 10210#ifdef HAVE_XWIDGETS
10211 if (xv) 10211 if (xv)
10212 { 10212 {
10213 uint state = xev->mods.effective;
10214
10215 if (xev->buttons.mask_len)
10216 {
10217 if (XIMaskIsSet (xev->buttons.mask, 1))
10218 state |= Button1Mask;
10219 if (XIMaskIsSet (xev->buttons.mask, 2))
10220 state |= Button2Mask;
10221 if (XIMaskIsSet (xev->buttons.mask, 3))
10222 state |= Button3Mask;
10223 }
10224
10213 if (found_valuator) 10225 if (found_valuator)
10214 xwidget_scroll (xv, xev->event_x, xev->event_y, 10226 xwidget_scroll (xv, xev->event_x, xev->event_y,
10215 xv_total_x, xv_total_y, xev->mods.effective, 10227 xv_total_x, xv_total_y, state,
10216 xev->time, any_stop_p); 10228 xev->time, any_stop_p);
10217 else 10229 else
10218 xwidget_motion_notify (xv, xev->event_x, xev->event_y, 10230 xwidget_motion_notify (xv, xev->event_x, xev->event_y,
10219 xev->mods.effective, xev->time); 10231 state, xev->time);
10220 10232
10221 goto XI_OTHER; 10233 goto XI_OTHER;
10222 } 10234 }