From 844fc0850535556c733bbe78c44ef656b2d6cccd Mon Sep 17 00:00:00 2001 From: =?utf8?q?Jan=20Dj=C3=A4rv?= Date: Fri, 10 Sep 2004 18:04:19 +0000 Subject: [PATCH] * xselect.c (x_reply_selection_request): XSync and UNBLOCK before x_uncatch_errors so that possible protocol errors are delivered. --- src/ChangeLog | 5 +++++ src/xselect.c | 6 ++++-- 2 files changed, 9 insertions(+), 2 deletions(-) diff --git a/src/ChangeLog b/src/ChangeLog index dee383a888f..7f6d9f4b1c1 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,3 +1,8 @@ +2004-09-10 Jan Dj,Ad(Brv + + * xselect.c (x_reply_selection_request): XSync and UNBLOCK before + x_uncatch_errors so that possible protocol errors are delivered. + 2004-09-10 Eli Zaretskii * msdos.c (msdos_set_cursor_shape): Add debugging print-out to diff --git a/src/xselect.c b/src/xselect.c index 5de1beb9ac4..80ed34c69e2 100644 --- a/src/xselect.c +++ b/src/xselect.c @@ -744,9 +744,11 @@ x_reply_selection_request (event, format, data, size, type) refering to the deleted window, and we'll get a BadWindow error in XTread_socket when processing the events. I don't have an idea how to fix that. gerd, 2001-01-98. */ - XFlush (display); - x_uncatch_errors (display, count); + /* 2004-09-10: XSync and UNBLOCK so that possible protocol errors are + delivered before uncatch errors. */ + XSync (display, False); UNBLOCK_INPUT; + x_uncatch_errors (display, count); } /* Handle a SelectionRequest event EVENT. -- 2.39.5