]> git.eshelyaron.com Git - emacs.git/commitdiff
Don't calculate any frame for extension events
authorPo Lu <luangruo@yahoo.com>
Thu, 3 Mar 2022 02:49:55 +0000 (10:49 +0800)
committerPo Lu <luangruo@yahoo.com>
Thu, 3 Mar 2022 02:50:30 +0000 (10:50 +0800)
* src/xterm.c (handle_one_xevent): If event is not a core event,
don't try to calculate any from event.xany.window.

src/xterm.c

index 9960f4930d2cc52e6003e7d518983698aff4f6c5..47f9d31ad44edd2542dec519f6c1a920de569ebe 100644 (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.  */