From 9e084ddad168102981386159cbf0ad2c884db54b Mon Sep 17 00:00:00 2001 From: Po Lu Date: Mon, 21 Feb 2022 19:40:28 +0800 Subject: [PATCH] Try to fix bug#54051 * src/xterm.c (handle_one_xevent): Don't give obviously bogus configure events to Xt. --- src/xterm.c | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) diff --git a/src/xterm.c b/src/xterm.c index 6d498ad3819..ca74f6cbd9f 100644 --- a/src/xterm.c +++ b/src/xterm.c @@ -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; } -- 2.39.5