From f6b03f106c0cd2a225b528c972840204103e58a6 Mon Sep 17 00:00:00 2001 From: Kenny Levinsen Date: Tue, 14 Jan 2020 19:42:15 +0100 Subject: [PATCH] wayland: Cancel display read before abortOnFatalError Calling wl_display_cancel_read immediately ensures that other readers waiting on us will have a chance to wake up and discover the error in a timely manner. --- glfw/wl_window.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/glfw/wl_window.c b/glfw/wl_window.c index 505d84829..cdc6ef0cf 100644 --- a/glfw/wl_window.c +++ b/glfw/wl_window.c @@ -782,8 +782,8 @@ handleEvents(monotonic_t timeout) errno = 0; if (wl_display_flush(display) < 0 && errno != EAGAIN) { - abortOnFatalError(errno); wl_display_cancel_read(display); + abortOnFatalError(errno); return; }