From f29fd102d7531619a98acbf0f3e012fb0f6b233f Mon Sep 17 00:00:00 2001 From: Po Lu Date: Sun, 10 Apr 2022 13:55:18 +0800 Subject: [PATCH] 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. --- src/xterm.c | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/src/xterm.c b/src/xterm.c index 34b7c026be8..9de46aba103 100644 --- a/src/xterm.c +++ b/src/xterm.c @@ -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. */ -- 2.39.5