# HG changeset patch # User Richard M. Stallman # Date 1041813931 0 # Node ID 6b6ac8aa78d2e21e5991618cfabb7a31bf03c385 # Parent 2990b2f8bfb59643b4511f809325e12bd6e0a1e3 (x_catch_errors): Save dpy using make_save_value. (x_catch_errors_unwind): Call XSync. diff -r 2990b2f8bfb5 -r 6b6ac8aa78d2 src/xterm.c --- a/src/xterm.c Sun Jan 05 23:38:59 2003 +0000 +++ b/src/xterm.c Mon Jan 06 00:45:31 2003 +0000 @@ -12179,7 +12179,9 @@ /* Make sure any errors from previous requests have been dealt with. */ XSync (dpy, False); - record_unwind_protect (x_catch_errors_unwind, x_error_message_string); + record_unwind_protect (x_catch_errors_unwind, + Fcons (make_save_value (dpy, 0), + x_error_message_string)); x_error_message_string = make_uninit_string (X_ERROR_MESSAGE_SIZE); SSET (x_error_message_string, 0, 0); @@ -12193,7 +12195,13 @@ x_catch_errors_unwind (old_val) Lisp_Object old_val; { - x_error_message_string = old_val; + Lisp_Object first; + + first = XCAR (old_val); + + XSync (XSAVE_VALUE (first)->pointer, False); + + x_error_message_string = XCDR (old_val); return Qnil; }