From 597243906a779394a9b3c7161614bb497f1c9f18 Mon Sep 17 00:00:00 2001 From: Viktor Jannicke Date: Wed, 21 Oct 2026 20:28:43 +0200 Subject: [PATCH] Fix webui_get_count() returning 0 for navigation events The WebSocket navigation event stores the URL as argument 0 and the WebKitGTK one stores the URL and navigation type as arguments 0 and 1, but neither set `event_inf->count`. Co-Authored-By: Claude Opus 5.5 --- src/webui.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/webui.c b/src/webui.c index 6765926e4..ab5774231 100644 --- a/src/webui.c +++ b/src/webui.c @@ -13065,6 +13065,7 @@ static void _webui_ws_process( // Event Info Extras event_inf->event_data[0] = url; event_inf->event_size[0] = url_len; + event_inf->count = 1; _webui_window_event( win, // Event -> Window @@ -14600,6 +14601,7 @@ BOOL WINAPI DllMain(HINSTANCE hinstDLL, DWORD fdwReason, LPVOID lpReserved) { event_inf->event_size[0] = strlen(uri); event_inf->event_data[1] = type; event_inf->event_size[1] = strlen(type); + event_inf->count = 2; _webui_window_event( win, // Event -> Window