mirror of
https://github.com/kovidgoyal/kitty
synced 2026-07-27 18:51:41 +02:00
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:
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;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user