summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPo Lu <luangruo@yahoo.com>2022-02-21 19:40:28 +0800
committerPo Lu <luangruo@yahoo.com>2022-02-21 19:40:28 +0800
commit9e084ddad168102981386159cbf0ad2c884db54b (patch)
tree6421246be3adc8e52ff0ff0ae51422dc40ddad32
parentfc281e0df3d6f3ea359eae440cdae7e65412c06d (diff)
downloademacs-9e084ddad168102981386159cbf0ad2c884db54b.tar.gz
Try to fix bug#54051
* src/xterm.c (handle_one_xevent): Don't give obviously bogus configure events to Xt.
-rw-r--r--src/xterm.c14
1 files 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;
}