On windows/arm64 Wails beta.24's SetZoom fails with
ErrDoubleArgUnsupported and only logs it: Go's stdcall on arm64 loads
x0-x7 and never d0 (golang/go#62583), so ICoreWebView2Controller::
put_ZoomFactor(double) can't be called through SyscallN. The text size
was saved and never applied.
zoom_windows_arm64.go calls put_ZoomFactor (vtbl slot 8) through a
two-instruction thunk in VirtualAlloc'd executable memory,
`fmov d0, x1; br x2`, called as SyscallN(thunk, this, bits, fn). The
controller is reached by reflection (WebviewWindow.impl.chromium.
controller). The window's Zoom option goes through the same broken call,
so on that platform the size is put on each page once navigation
completes (zoomsAfterLoad), on the UI thread. Other platforms are
unchanged: setPageZoom moves to zoom_other.go.
Run:
- The thunk's encoding in a C harness on macOS arm64 (MAP_JIT): it
passed 1.25 in d0, returned the callee's HRESULT, kept `this`.
- On the Windows 11 AMD64 box, in a sandbox profile on its own port, a
check build of this change (same reflection path and vtbl slot, the
call made directly since amd64 passes doubles in X1): put_ZoomFactor
returned S_OK for both windows at 110% and 150%, and screenshots show
the page drawn at 150%.
- gofmt -l; go vet ./... darwin, GOOS=linux -tags nogui, GOOS=windows,
and GOOS=windows GOARCH=arm64 (vet + build); go test ./internal/gui/.
Not tried: the thunk on real Windows on ARM hardware; the reporter is
asked to confirm. No GUI assets changed, so the Playwright suite wasn't run.
With Dock on "Hide", magpie runs as an Accessory app. A full-screen
window's title bar comes down only with the menu bar, and an Accessory app
has none, so the full-screen main window had no close, minimize or
full-screen button, and only Esc left full screen.
magpie now joins the Dock as a window starts entering full screen, from a
native NSWindowWillEnterFullScreenNotification observer: Wails hands that
event to Go later, and switching once the window is full screen doesn't
bring the title bar back. dock counts a full-screen main window (inDock),
so reopening the app or changing the Dock setting during full screen keeps
magpie in the Dock, and WindowDidExitFullScreen applies the setting again.
TestFullscreenKeepsDock checks inDock; it doesn't compile on main. On
macOS 27.0.1 with Dock on "Hide", main stays out of the Dock in full screen
with no title bar; this branch joins the Dock with the title bar and its
buttons, and leaves it after the green button, View > Toggle Full Screen
or Esc.
Fixes#763