wayland: Only cancel display read after prepare success
The display reader count only increments when wl_display_prepare_read succeeds. Calling wl_display_cancel_read when wl_display_prepare_read has not succeeded results in a negative reader count, which does not have well-defined behavior.
This commit is contained in:
parent
f6b03f106c
commit
4acab65016
1
glfw/wl_window.c
vendored
1
glfw/wl_window.c
vendored
@ -768,7 +768,6 @@ handleEvents(monotonic_t timeout)
|
||||
if (num_dispatched < 0) {
|
||||
if (errno == EAGAIN) continue;
|
||||
int last_error = wl_display_get_error(display);
|
||||
wl_display_cancel_read(display);
|
||||
if (last_error) abortOnFatalError(last_error);
|
||||
return;
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user