Function register_xlib_error_hook
pub fn register_xlib_error_hook(
hook: Box<dyn Fn(*mut c_void, *mut c_void) -> bool + Send + Sync>,
)Expand description
Hook to winit’s xlib error handling callback.
This method is provided as a safe way to handle the errors coming from X11
when using xlib in external crates, like glutin for GLX access. Trying to
handle errors by speculating with XSetErrorHandler is unsafe.
Be aware that your hook is always invoked and returning true from it will
prevent winit from getting the error itself. It’s wise to always return
false if you’re not initiated the Sync.