Skip to content

Fix webui_get_count() returning 0 for navigation events - #726

Merged
AlbertShown merged 1 commit into
webui-dev:mainfrom
ViktorJannicke:fix/navigation-event-count
Oct 22, 2026
Merged

AlbertShown merged 1 commit into
webui-dev:mainfrom
ViktorJannicke:fix/navigation-event-count

Conversation

@ViktorJannicke

Copy link
Copy Markdown
Contributor

Fixes #724

WEBUI_EVENT_NAVIGATION events now report their argument count. The WebSocket path sets event_inf->count = 1 (the URL), and the WebKitGTK path sets event_inf->count = 2 (the URL and the navigation type). Before this change webui_get_count(e) returned 0, although webui_get_string(e) returned the URL. Nothing changes in src/civetweb/ or include/webui.h.

Verified on Linux x64 with the reproducer from the issue in headless Chromium. Before the change it printed count = 0, and after it count = 1 with the same URL from webui_get_string(e), in 3 of 3 runs each. The WebKitGTK change compiles, but I did not run it.

🤖 Generated with Claude Code

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 <noreply@anthropic.com>
@AlbertShown
AlbertShown merged commit 74aaf9f into webui-dev:main Oct 22, 2026
26 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

webui_get_count() returns 0 for WEBUI_EVENT_NAVIGATION

2 participants