Also filter XI_KeyRelease events

* src/xterm.c (handle_one_xevent): Also filter XI_KeyRelease
events through the X input method.
This commit is contained in:
Po Lu 2021-11-22 09:40:47 +08:00
parent a4ac609098
commit 4eb228bfac

View file

@ -10649,6 +10649,25 @@ handle_one_xevent (struct x_display_info *dpyinfo,
}
case XI_KeyRelease:
x_display_set_last_user_time (dpyinfo, xev->time);
#ifdef HAVE_X_I18N
XKeyPressedEvent xkey;
memset (&xkey, 0, sizeof xkey);
xkey.type = KeyRelease;
xkey.serial = 0;
xkey.send_event = xev->send_event;
xkey.display = xev->display;
xkey.window = xev->event;
xkey.root = xev->root;
xkey.subwindow = xev->child;
xkey.time = xev->time;
xkey.state = xev->mods.effective;
xkey.keycode = xev->detail;
xkey.same_screen = True;
x_filter_event (dpyinfo, (XEvent *) &xkey);
#endif
goto XI_OTHER;
case XI_PropertyEvent:
case XI_HierarchyChanged: