]> git.eshelyaron.com Git - emacs.git/commitdiff
Add effective group to xkey events when handling XI key press events
authorPo Lu <luangruo@yahoo.com>
Tue, 4 Jan 2022 03:16:46 +0000 (11:16 +0800)
committerPo Lu <luangruo@yahoo.com>
Tue, 4 Jan 2022 03:17:59 +0000 (11:17 +0800)
* src/xterm.c (handle_one_xevent): Add effective group to
xkey.state when translating XI key events.

src/xterm.c

index 31e39280b36ca51140c3091f3a14a56821a990a6..8202e8fb003eaef6ad342238446d2027f3eb25e4 100644 (file)
@@ -10668,7 +10668,8 @@ handle_one_xevent (struct x_display_info *dpyinfo,
              xkey.root = xev->root;
              xkey.subwindow = xev->child;
              xkey.time = xev->time;
-             xkey.state = xev->mods.effective;
+             xkey.state = ((xev->mods.effective & ~(1 << 13 | 1 << 14))
+                           | (xev->group.effective << 13));
              xkey.keycode = xev->detail;
              xkey.same_screen = True;