From 617dc2ce12eb6183b4ae3d3fe73572e43629c825 Mon Sep 17 00:00:00 2001 From: ManoloFLTK <41016272+ManoloFLTK@users.noreply.github.com> Date: Thu, 23 Jun 2022 19:12:35 +0200 Subject: Fix for issue #450: Fl_Counter slips into infinite loop. This issue revealed that the macOS and Wayland platform processed events slightly differently from other platforms. Under X11 and Windows, Fl::wait() processes one event if one is present, and also all other events present in the event queue immediately after the processing of that event. Under macOS and Wayland, Fl::wait() processes one event if one is present and returns. This commits makes the macOS and Wayland platforms behave as other platforms. --- src/drivers/Wayland/Fl_Wayland_Screen_Driver.cxx | 2 ++ 1 file changed, 2 insertions(+) (limited to 'src/drivers') diff --git a/src/drivers/Wayland/Fl_Wayland_Screen_Driver.cxx b/src/drivers/Wayland/Fl_Wayland_Screen_Driver.cxx index 81f6b9258..dad143cb0 100644 --- a/src/drivers/Wayland/Fl_Wayland_Screen_Driver.cxx +++ b/src/drivers/Wayland/Fl_Wayland_Screen_Driver.cxx @@ -1058,6 +1058,8 @@ static const struct wl_registry_listener registry_listener = { static void fd_callback(int unused, struct wl_display *display) { wl_display_dispatch(display); + static Fl_Wayland_System_Driver *sys_dr = (Fl_Wayland_System_Driver*)Fl::system_driver(); + while (sys_dr->poll_or_select() > 0) wl_display_dispatch(display); } -- cgit v1.2.3