From 2ab73286b7a58eb983da21bca8b781ec884eb996 Mon Sep 17 00:00:00 2001 From: Po Lu Date: Thu, 6 Jan 2022 15:50:52 +0800 Subject: [PATCH] Add group to xkey state before filtering it on XI_KeyRelease * src/xterm.c (handle_one_xevent): Add group to xkey.state before filtering an XI2 key release event. This fixes fcitx on some systems. --- src/xterm.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/xterm.c b/src/xterm.c index ad6652fb33c..ff6c71283ec 100644 --- a/src/xterm.c +++ b/src/xterm.c @@ -10998,7 +10998,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; -- 2.39.2