Merge remote-tracking branch 'origin/glass-cockpit-refit'

This commit is contained in:
Joe DiPrima
2026-07-29 19:56:31 -05:00
4 changed files with 151 additions and 13 deletions
+42
View File
@@ -764,3 +764,45 @@ per-rig `--bridge-pos`/`--layout` args.
- round-trip: relaunched `load` against the game-written cfg → after 12 s (past the re-snap) the
*Flight Controls* window was physically at (777,333), all 7 at their saved coords — the re-snap
guard held.
## 2026-07-29 — glass_layout.cfg gains a per-line ",noframe" option
Requested: strip a window's title bar from the layout file. Appending `,noframe` to a window's
line makes that window a bare `WS_POPUP` -- no caption, no border, nothing but the display and its
buttons -- for a multi-monitor wall where the chrome is only noise.
Heat MFD=1920,0,657,539,noframe
Options are comma-separated after the four numbers and unknown ones are IGNORED, so an older build
reading a newer file loses the option but never the line (the bindings.txt grammar rule applied
here). Hand-edited; the file is otherwise machine-written.
### The workflow is two-stage, on purpose
Arrange FIRST, strip chrome LAST:
1. run with `BT_GLASS_LAYOUT=save` and drag the windows where you want them (they have title
bars -- this is just the normal sticky-layout flow),
2. quit,
3. hand-edit the cfg and append `,noframe` to the ones you want bare.
From then on those windows come up frameless AND PINNED -- with no caption there is nothing to
drag them by, which is the point: the arrangement is finished. Delete the flag to re-frame.
(An earlier cut made noframe windows draggable by their surface via `WM_NCHITTEST`->`HTCAPTION`.
Removed at the author's direction: it is not an interactive mode, it is the finishing step.)
The one thing it must not do is eat itself: **SaveLayout rewrites the WHOLE file** -- any later
drag of a FRAMED window triggers it -- so it writes the flag back for every window that carries
one. Without that, the first drag after adding the option would silently strip it.
### Ordering
The flag is read BEFORE frame sizing (`LoadLayout(quiet)` pre-pass, then the normal pass after
`ComputeLayout`): `AdjustWindowRect` -- and therefore the ring placement -- depends on whether a
window carries chrome. The pre-pass is quiet so the restore still logs exactly once.
### Verified live
- Two flagged windows (`Heat MFD`, `Secondary / Radar`) came up with `WS_CAPTION` CLEAR while the
other five kept it -- read back out of the live windows with `GetWindowLong(GWL_STYLE)`.
- A click still dispatched on the frameless radar: `[glasswin] CLICK 'Secondary / Radar' addr=0x18`.
- A finished-drag save (`WM_EXITSIZEMOVE`) round-tripped BOTH flags back into the rewritten file,
header comment and all.
- surround / exploded / layout=off / pod / dev: boot + simulate, zero faults.