From a384add9e973d13b050411c14a3286c90916a81b Mon Sep 17 00:00:00 2001 From: IoIxD Date: Thu, 18 Dec 2025 23:50:03 -0700 Subject: [PATCH] wayland: properly do MwLLPending and MwLLNextEvent --- src/backend/wayland.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/src/backend/wayland.c b/src/backend/wayland.c index 5c65906..f055117 100644 --- a/src/backend/wayland.c +++ b/src/backend/wayland.c @@ -972,7 +972,6 @@ static void popup_configure(void* data, static void popup_done(void* data, struct xdg_popup* xdg_popup) { - printf("Sdfgs\n"); }; struct xdg_popup_listener popup_listener = { @@ -1251,10 +1250,14 @@ static void MwLLFreeColorImpl(MwLLColor color) { } static int MwLLPendingImpl(MwLL handle) { - return event_loop(handle); + return handle->wayland.events_pending || wl_display_dispatch(handle->wayland.display); } static void MwLLNextEventImpl(MwLL handle) { + event_loop(handle); + if(handle->wayland.events_pending) { + handle->wayland.events_pending = MwFALSE; + } } static void MwLLSetTitleImpl(MwLL handle, const char* title) {