glass_layout.cfg: ",noframe" per-line option strips a window's title bar

Append it to a window's line and that window becomes a bare WS_POPUP -- no
caption, no border, just 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).

TWO THINGS THAT WOULD HAVE MADE IT A TRAP, both handled:

 - A frameless window has NO TITLE BAR TO DRAG, which is the entire point of
   the sticky layout.  So a noframe window is dragged BY ITS SURFACE:
   WM_NCHITTEST returns HTCAPTION anywhere that is not a button, HTCLIENT over
   one.  Buttons stay clickable, and because Windows drives the move the drag
   still ends in WM_EXITSIZEMOVE -- so it still saves.
 - SaveLayout rewrites the WHOLE file, so it writes the flag back.  Without
   that, the first finished-drag after adding the option would have silently
   stripped it.

Ordering: the flag is read BEFORE frame sizing (a quiet LoadLayout pre-pass,
then the normal pass after ComputeLayout), because 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 came up with WS_CAPTION clear while the
other five kept it (read back with GetWindowLong(GWL_STYLE)); a click still
dispatched on the frameless radar (CLICK 'Secondary / Radar' addr=0x18); and a
WM_EXITSIZEMOVE save round-tripped both flags back into the rewritten file.
surround / exploded / layout=off / pod / dev all boot and simulate clean.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
This commit is contained in:
Cyd
2026-07-29 10:57:00 -05:00
co-authored by Claude Opus 5
parent 4c7f6fd9b1
commit f5f4c6c198
4 changed files with 149 additions and 13 deletions
+33
View File
@@ -764,3 +764,36 @@ 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 two things that would have made it a trap
1. **A frameless window has no title bar to drag** -- which is the entire point of the sticky
layout. So a noframe window is dragged BY ITS SURFACE: `WM_NCHITTEST` returns `HTCAPTION`
anywhere that is not a button and `HTCLIENT` over one. Buttons stay clickable, and because
Windows drives the move, the drag still ends in `WM_EXITSIZEMOVE` -- so it still SAVES.
2. **SaveLayout rewrites the whole file**, so it writes the flag back. Without that the first
finished-drag after adding the option would have silently stripped 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.