]> git.eshelyaron.com Git - emacs.git/commitdiff
Try to fix bug#54051
authorPo Lu <luangruo@yahoo.com>
Mon, 21 Feb 2022 11:40:28 +0000 (19:40 +0800)
committerPo Lu <luangruo@yahoo.com>
Mon, 21 Feb 2022 11:40:28 +0000 (19:40 +0800)
* src/xterm.c (handle_one_xevent): Don't give obviously bogus
configure events to Xt.

src/xterm.c

index 6d498ad38198fcd3a8fd5ba263f8f46e2c123499..ca74f6cbd9f0bbc3db67d8b395b212345481bec7 100644 (file)
@@ -12303,9 +12303,17 @@ handle_one_xevent (struct x_display_info *dpyinfo,
     OTHER:
 #ifdef USE_X_TOOLKIT
       block_input ();
-    if (*finish != X_EVENT_DROP)
-      XtDispatchEvent ((XEvent *) event);
-    unblock_input ();
+      if (*finish != X_EVENT_DROP)
+       {
+         /* Ignore some obviously bogus ConfigureNotify events that
+            other clients have been known to send Emacs.
+            (bug#54051)*/
+         if (event->type != ConfigureNotify
+             || (event->xconfigure.width != 0
+                 && event->xconfigure.height != 0))
+           XtDispatchEvent ((XEvent *) event);
+       }
+      unblock_input ();
 #endif /* USE_X_TOOLKIT */
     break;
     }