Skip to content

fix(widget): apply native window fixes after frontend ready - #374

Merged
attson merged 1 commit into
mainfrom
hotfix/widget-ready-native-fix
Sep 3, 2026
Merged

fix(widget): apply native window fixes after frontend ready#374
attson merged 1 commit into
mainfrom
hotfix/widget-ready-native-fix

Conversation

@attson

@attson attson commented Sep 3, 2026

Copy link
Copy Markdown
Owner

Root cause

The Linux frame-sync workaround ran once from Wails OnStartup. Wails invokes that callback concurrently with native window setup, before the GTK window is realized. gtk_widget_get_window() could therefore return NULL; the idle callback removed itself and the workaround never took effect. Under Mutter/X11 the widget could then remain alive while GTK stopped drawing and processing visible interaction after a frame-sync acknowledgement stalled.

Fix

  • Keep required macOS OnStartup setup and repeat it idempotently from WidgetBridge.Ready().
  • Keep Windows taskbar polling at startup and repeat it after Ready for delayed HWND registration.
  • Move Linux frame-sync disabling to the post-frontend-ready hook, with a bounded 50ms retry window (10s max) so it waits for realization without creating a Wayland CPU loop.

Verification

  • go test -tags webkit2_41 -timeout 60s ./desktop/
  • go vet -tags webkit2_41 ./desktop/
  • npm test -- --run (177 files, 2322 tests)
  • GOOS=windows CGO_ENABLED=0 go test -c ...

@attson
attson merged commit 423c66a into main Sep 3, 2026
7 checks passed
@attson
attson deleted the hotfix/widget-ready-native-fix branch September 3, 2026 08:21
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.

1 participant