Wayland: Cancel display fd read before callbacks

Cancel the prepared-to-read state on the calling thread before starting
to call back to user code.

Emitting close requests here is not a good choice but that is for
a future commit to address.
This commit is contained in:
Camilla Löwy 2022-03-03 16:28:44 +01:00
parent 3c2913dcb9
commit 203a7c59d2

View File

@ -751,6 +751,8 @@ static void handleEvents(int timeout)
// from the Wayland session; try to handle that the best we can. // from the Wayland session; try to handle that the best we can.
if (!flushDisplay()) if (!flushDisplay())
{ {
wl_display_cancel_read(_glfw.wl.display);
_GLFWwindow* window = _glfw.windowListHead; _GLFWwindow* window = _glfw.windowListHead;
while (window) while (window)
{ {
@ -758,7 +760,6 @@ static void handleEvents(int timeout)
window = window->next; window = window->next;
} }
wl_display_cancel_read(_glfw.wl.display);
return; return;
} }