Skip to content

Cross-platform frameless title bars + BrowserWindow setPosition/setBounds - #14

Merged
ipfizz merged 3 commits into
mainfrom
alpha-5
Jun 28, 2026
Merged

Cross-platform frameless title bars + BrowserWindow setPosition/setBounds#14
ipfizz merged 3 commits into
mainfrom
alpha-5

Conversation

@ipfizz

@ipfizz ipfizz commented Jun 28, 2026

Copy link
Copy Markdown
Owner

What's in this PR

Two features developed and tested on alpha-5, landing toward the next release.

Cross-platform frameless title bars (9e8bdcb)

  • Shared the frameless title-bar script (src/main/platform/window-controls.ts) so it's injected identically on Windows, macOS, and Linux.
  • --app-region: drag is mirrored to native -webkit-app-region so macOS drags natively (WinCairo ignores -webkit-app-region, which is why the custom property exists).
  • New docs page: website/src/content/docs/concepts/frameless-windows.md.

BrowserWindow.setPosition / setBounds / getPosition (107dc3e)

  • Windows: full — SetWindowPos, verified by a real round-trip integration test (getBounds reads the change back through GetWindowRect).
  • macOS: best-effort via setFrameOrigin: (bottom-left origin; top-left mapping is a follow-up).
  • Linux: size-only — GTK4 leaves placement to the compositor.
  • Unit tests + Windows integration test; parity doc updated.

Testing

  • validate:windows185 pass, 0 fail (type-check + lint clean).
  • New: tests/integration/windows/window-bounds.test.ts (engine-gated SetWindowPos/GetWindowRect round-trip) and the frameless-window probe.

Honest caveat

The macOS/Linux window-control handlers and Linux native drag are deferred — they need on-device verification that can't be done from a Windows machine, and a bug there could break window creation. The API surface and macOS native drag are in; the native handlers are the next, test-on-device step. The docs and parity table say exactly this.

@ipfizz
ipfizz merged commit 796cadd into main Jun 28, 2026
3 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.

1 participant