Skip to content

Rename Fullscreen → Full Window; add true desktop Fullscreen#12

Merged
vecnode merged 1 commit into
mainfrom
full-window-and-desktop-fullscreen
Jun 28, 2026
Merged

Rename Fullscreen → Full Window; add true desktop Fullscreen#12
vecnode merged 1 commit into
mainfrom
full-window-and-desktop-fullscreen

Conversation

@vecnode

@vecnode vecnode commented Jun 28, 2026

Copy link
Copy Markdown
Owner

What & why

The previous "Fullscreen" button only filled the app's content area (the WebView viewport), not the OS desktop. This splits the two behaviours.

  • Full Window — the renamed previous button. Fills the WebView viewport via the Fullscreen API on the preview pane; the native window is untouched. Behaviour unchanged.
  • Fullscreen (new) — does the same preview-pane fullscreen and drives the native OS window into borderless full-screen, so the sketch covers the whole desktop.

How the desktop fullscreen works

A single JS→C++ bridge: window.neoSetDesktopFullscreen(bool), bound in main.cpp. On Windows it strips the window frame (WS_CAPTION/WS_THICKFRAME/…) and stretches the window over the monitor (MONITORINFO + SetWindowPos), saving the prior style and WINDOWPLACEMENT to restore. On Linux it calls gtk_window_fullscreen / gtk_window_unfullscreen. The JS keeps using requestFullscreen() on .right-panel (so the sketch — not the editor/menus — is what's shown), then calls the bridge; Esc leaves element fullscreen and a fullscreenchange handler restores the native window.

Reviewer notes

  • node --check passes; the Debug target builds and links the new Win32 calls; app launches cleanly with the binding registered.
  • The DOM↔native fullscreen interaction in WebView2 can't be exercised headlessly here — worth a manual check: Run a sketch → Fullscreen should cover the whole desktop with the centred canvas on white, and Esc should restore the 1280×720 window. Full Window should fill just the app window.

🤖 Generated with Claude Code

- Rename the existing button "Fullscreen" -> "Full Window" (it fills the
  WebView viewport / app content area; behaviour unchanged).
- Add a new "Fullscreen" button that also drives the native OS window into
  borderless full-screen so the sketch covers the whole desktop, not just
  the app window. Implemented via a JS->C++ bridge:
  window.neoSetDesktopFullscreen(bool), bound in main.cpp (Win32 borderless
  on Windows, gtk_window_fullscreen on Linux), with the windowed style and
  placement saved for restore.
- Esc exits both; a fullscreenchange handler restores the native window.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
@vecnode vecnode merged commit f38a889 into main Jun 28, 2026
@vecnode vecnode deleted the full-window-and-desktop-fullscreen branch June 28, 2026 13:56
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