From: Po Lu Date: Wed, 6 Jul 2022 08:31:54 +0000 (+0800) Subject: Stop synchronizing after sending XEmbed events X-Git-Tag: archive/raspbian/1%29.2+1-2+rpi1^2~5^2~16^2~1886^2~1147 X-Git-Url: https://dgit.raspbian.org/?a=commitdiff_plain;h=e6504c3eda12c72268d2db6598764f043b74c24d;p=emacs.git 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. --- 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. */