verstak-desktop/scripts
mirivlad 8e5690e8f7 feat: intercept GDK button 8/9 for mouse back/forward navigation
WebKitGTK does not propagate XButton1/XButton2 (buttons 8 and 9) into
DOM events — event.button and event.buttons are always 0 for these
clicks. This prevents the frontend from detecting hardware back/forward
mouse buttons for history navigation.

Solution: patch Wails' window.c on Linux to intercept button-press-event
at the GTK signal level (before WebKit processes it). For button 8/9 we
call webkit_web_view_run_javascript() to dispatch a native CustomEvent
('verstak:navigate-back' / 'verstak:navigate-forward') into the page,
allowing the frontend to navigate history without any workaround on the
JS side.

The patch is applied automatically during build via scripts/build.sh:
  go mod vendor → patch -p0 < patches/window.c.button-press.patch
Vendor directory is gitignored.
2026-06-21 13:49:13 +08:00
..
build.sh feat: intercept GDK button 8/9 for mouse back/forward navigation 2026-06-21 13:49:13 +08:00
check.sh fix: reorder build — frontend before Go (//go:embed deps), auto-install node_modules/go mod 2026-06-16 12:32:31 +08:00
install-dev-plugins.sh fix: polish workspace files and editor shell 2026-06-19 23:37:10 +08:00
smoke-platform.sh feat: add bundle-host-test.cjs + smoke integration 2026-06-17 18:51:14 +08:00
test.sh fix: reorder build — frontend before Go (//go:embed deps), auto-install node_modules/go mod 2026-06-16 12:32:31 +08:00
update-and-build-all.sh fix: polish workspace files and editor shell 2026-06-19 23:37:10 +08:00