pub type XlibErrorHookRegistrar = Box<dyn Fn(Box<dyn Fn(*mut c_void, *mut c_void) -> bool + Send + Sync>)>;
Expand description
When using Xlib we need to get errors from it somehow, however creating
inner XDisplay
to handle that or change the error hook is unsafe in
multithreaded applications, given that error hook is per process and not
connection.
The hook registrar must call to the function inside xlib error
handler
.
The bool
value returned by that hook tells whether the error was handled
by it or not. So when it returns true
it means that your error handling
routine shouldn’t handle the error as it was handled by the hook already.
Aliased Type§
struct XlibErrorHookRegistrar(/* private fields */);