Don't calculate any frame for extension events

* src/xterm.c (handle_one_xevent): If event is not a core event,
don't try to calculate any from event.xany.window.
This commit is contained in:
Po Lu 2022-03-03 10:49:55 +08:00
parent 5436406286
commit b727d6ebeb

View file

@ -9794,10 +9794,10 @@ handle_one_xevent (struct x_display_info *dpyinfo,
inev.ie.kind = NO_EVENT;
inev.ie.arg = Qnil;
#ifdef HAVE_XKB
if (event->type != dpyinfo->xkb_event_type)
/* Ignore events coming from various extensions, such as XFIXES and
XKB. */
if (event->type < LASTEvent)
{
#endif
#ifdef HAVE_XINPUT2
if (event->type != GenericEvent)
#endif
@ -9806,11 +9806,9 @@ handle_one_xevent (struct x_display_info *dpyinfo,
else
any = NULL;
#endif
#ifdef HAVE_XKB
}
else
any = NULL;
#endif
if (any && any->wait_event_type == event->type)
any->wait_event_type = 0; /* Indicates we got it. */