Stage 3b: transparent native window so the Aero frame is a real frame

.window's 6px radius and its outer drop shadow are painted by the webview
OUTSIDE the window's own rectangle, so on an opaque surface they were simply
clipped — square corners, no shadow. chromeOptions now passes
`transparent: true`, the page paints no background of its own, and .window
takes a 6px margin as the gutter the shadow falls into (h-screen shrinks by the
same amount so the gutter does not produce a scrollbar).

Confirmed on Linux/WebKitGTK in a real run, which is the half the Firefox
harness cannot model:
  GTK: Created window without decorations (custom titlebar)
  GTK: Created transparent window
  GTK WebKit: Applied transparent background to webview

Also caught by the run rather than shipped: `transparent` is set in
chromeOptions, which openSecondaryWindow spreads too — so the editor and
connection-manager windows became transparent while still rendering bare
content, i.e. floating widgets on nothing. Both roots now take the same
.window.glass frame and their own windowFocused signal. The editor's blur
binding had to merge with the existing flushDraft() call; a duplicated host key
is a TS1117 build error rather than a merge, which is how it surfaced.

The old anti-flash <style> in index.html is gone with the opaque backgrounds it
guarded — windows are created hidden and revealed on dom-ready anyway.

Not handled yet: a maximized Win7 window has no radius, shadow or gutter. The
6px margin currently applies in every state.

Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
2026-08-16 02:35:44 +02:00
co-authored by Claude
parent 2294453c93
commit fe75904872
7 changed files with 44 additions and 24 deletions
+11
View File
@@ -639,6 +639,17 @@ body {
border-color: var(--w7-li-bd-hl);
}
/* ---- Window frame ----
The native window is transparent (chromeOptions in src/bun/windows.ts), so
nothing but .window paints an opaque surface. The margin is the gutter the
drop shadow falls into — without it the shadow has no room and the frame
reads as square. h-screen (100vh) has to shrink by the same amount or the
window overflows into a scrollbar. */
.win7 .window {
margin: 6px;
height: calc(100vh - 12px);
}
/* Constant row geometry. 7.css gives ONLY tr.highlighted a 1px border, and
the table is border-collapse: collapse — so a selected row physically grew
1px at top and bottom and shoved every row below it down by 2px as the