Add missing details to filter event on XI2

* src/xterm.c (handle_one_xevent): Pass coordinates when
translating XI2 key events to core key events.
This commit is contained in:
Po Lu 2022-04-10 13:55:18 +08:00
parent 75bdf15c29
commit f29fd102d7

View file

@ -17279,6 +17279,11 @@ handle_one_xevent (struct x_display_info *dpyinfo,
xkey.state = ((xev->mods.effective & ~(1 << 13 | 1 << 14))
| (xev->group.effective << 13));
xkey.x = lrint (xev->event_x);
xkey.y = lrint (xev->event_y);
xkey.x_root = lrint (xev->root_x);
xkey.y_root = lrint (xev->root_y);
/* Some input methods react differently depending on the
buttons that are pressed. */
if (xev->buttons.mask_len)
@ -17672,6 +17677,10 @@ handle_one_xevent (struct x_display_info *dpyinfo,
xkey.time = xev->time;
xkey.state = ((xev->mods.effective & ~(1 << 13 | 1 << 14))
| (xev->group.effective << 13));
xkey.x = lrint (xev->event_x);
xkey.y = lrint (xev->event_y);
xkey.x_root = lrint (xev->root_x);
xkey.y_root = lrint (xev->root_y);
/* Some input methods react differently depending on the
buttons that are pressed. */