emacs-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: RFC: flicker-free double-buffered Emacs under X11


From: Ken Raeburn
Subject: Re: RFC: flicker-free double-buffered Emacs under X11
Date: Mon, 24 Oct 2016 14:43:50 -0400

> 
>> By the way: aren't most calls to x_catch_errors already buggy? AFAICT,
>> they don't generally call x_sync first.  The purpose of this mechanism
>> is to run a section of code in such a way that Emacs doesn't die if
>> something goes wrong in Xlib, but since Xlib error reporting is
>> asynchronous anyway, use of x_catch_errors without a preceding x_sync
>> (as I have in my code) can silently swallow X errors that we _do_ want
>> to kill Emacs.
> 
> That's for some X expert to answer, I really don't know enough about
> this stuff.  Ken, can you comment on this?

x_catch_errors itself starts with an XSync call to ensure errors on previous 
requests are processed with the default handler. Then x_uncatch_errors does 
another at the end of the region to make sure any errors generated by requests 
within the catching region are processed.  There’s also 
x_uncatch_errors_after_check, which I added specifically for cases where 
x_uncatch_errors was being called immediately after x_check_errors, which also 
does an XSync, so we could drop one round-trip (which was a performance issue 
for me in certain cases).


reply via email to

[Prev in Thread] Current Thread [Next in Thread]