On X11, fix errors bleeding from hooks handling them
This commit fixes it, by not updating the `latest_error` when any of the hooks handled the error, otherwise it'd interfere with the winit's error checking.
This commit is contained in:
parent
a88d2e079d
commit
b1a5fae1f5
3 changed files with 10 additions and 5 deletions
|
|
@ -653,9 +653,9 @@ unsafe extern "C" fn x_error_callback(
|
|||
// Don't log error.
|
||||
if !error_handled {
|
||||
error!("X11 error: {:#?}", error);
|
||||
// XXX only update the error, if it wasn't handled by any of the hooks.
|
||||
*xconn.latest_error.lock().unwrap() = Some(error);
|
||||
}
|
||||
|
||||
*xconn.latest_error.lock().unwrap() = Some(error);
|
||||
}
|
||||
// Fun fact: this return value is completely ignored.
|
||||
0
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue