From e6504c3eda12c72268d2db6598764f043b74c24d Mon Sep 17 00:00:00 2001 From: Po Lu Date: Wed, 6 Jul 2022 16:31:54 +0800 Subject: [PATCH] Stop synchronizing after sending XEmbed events * src/xterm.c (xembed_send_message): Don't sync and handle errors, which is actually why the XSync call in the spec exists. --- src/xterm.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/xterm.c b/src/xterm.c index 0180ea3c788..225c45ff7cb 100644 --- a/src/xterm.c +++ b/src/xterm.c @@ -25208,9 +25208,14 @@ xembed_send_message (struct frame *f, Time t, enum xembed_message msg, event.xclient.data.l[3] = data1; event.xclient.data.l[4] = data2; + /* XXX: the XEmbed spec tells us to trap errors around this request, + but I don't understand why: there is no way for clients to + survive the death of the parent anyway. */ + + x_ignore_errors_for_next_request (FRAME_DISPLAY_INFO (f)); XSendEvent (FRAME_X_DISPLAY (f), FRAME_X_OUTPUT (f)->parent_desc, False, NoEventMask, &event); - XSync (FRAME_X_DISPLAY (f), False); + x_stop_ignoring_errors (FRAME_DISPLAY_INFO (f)); } /* Change of visibility. */ -- 2.39.5