]> git.eshelyaron.com Git - emacs.git/commitdiff
Add missing details to filter event on XI2
authorPo Lu <luangruo@yahoo.com>
Sun, 10 Apr 2022 05:55:18 +0000 (13:55 +0800)
committerPo Lu <luangruo@yahoo.com>
Sun, 10 Apr 2022 05:55:18 +0000 (13:55 +0800)
* src/xterm.c (handle_one_xevent): Pass coordinates when
translating XI2 key events to core key events.

src/xterm.c

index 34b7c026be89ad4f7b0a9e16c220da49d8458d1e..9de46aba10300ce8e1402bc8c5c6744b7ffa5514 100644 (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.  */