the acrylic rides move drags: only a real resize parks the glass at blur

Kyle: "when clicking and dragging the window the window gets light." It
did, by design that no longer had a reason: WM_ENTERSIZEMOVE parked the
accent at plain BLURBEHIND for EVERY modal loop, move drags included, on
the old assumption that a suspended acrylic punches through on moves the
same way it does on resizes. Plain blur ignores the gradient tint and has
none of the acrylic's material dimming — measured over a striped backdrop,
every glass surface stepped ~15% brighter (band luma 45.5 -> 52.2) for the
whole of every titlebar drag. And no compensation was possible: move loops
emit no resize-drag event, the frontend never hears about them.

Measured on this machine (research/glass-drag harness, SC_MOVE posted so
no synthetic mouse goes near the UI, GUI_INMOVESIZE as ground truth): DWM
composites the acrylic straight through a move loop. Re-asserted mid-loop
it restored rest luma EXACTLY (45.5/31.8/29.4), stationary and through 28
frames of real mouse-speed motion — no punch-through, no trailing.

So the swap is now gated on SIZING_LATCH: a titlebar move keeps the
acrylic, a latched resize parks at Blur exactly as before (DWM genuinely
suspends acrylic in live resizes — that half is load-bearing and stays).
The WM_SIZING belt-and-braces arm swaps the accent too, so a resize the
hit-test latch misses still degrades one mouse-move late instead of never.

Verified after: entering a move loop changes nothing to the decimal;
entering a resize loop still swaps (+6.7 band luma, the intended trade)
and restores on release.
This commit is contained in:
KeelrLeek committed 2026-08-31 11:45:46 -05:00
1 parent 5e2ad18269
commit 75a95405a8
2 files changed
+28 -10

No files matched your search

+9 -5
View File
@@ -43,11 +43,15 @@ export function applyGlass(on) {
*
* HOW GLASS SURVIVES A GESTURE (2026-08-28, three layers, Rust-first):
*
* 1. Modal move/size loops (border drags, titlebar drags): the subclass in
* src-tauri/src/thumbbar.rs swaps the accent from ACRYLIC down to plain
* BLURBEHIND for the length of the loop and back on release. DWM
* suspends the acrylic inside the loop but keeps compositing the plain
* blur, so the window stays glassy instead of see-through or black.
* 1. Modal move/size loops: the subclass in src-tauri/src/thumbbar.rs parks
* the accent at plain BLURBEHIND for the length of a RESIZE loop and puts
* ACRYLIC back on release — DWM suspends the acrylic inside a live resize
* but keeps compositing the plain blur, so the window stays glassy
* instead of see-through or black. A titlebar MOVE loop keeps the
* acrylic: DWM composites it clean through one (measured 2026-08-31,
* stationary and at mouse speed), and the plain blur it would swap to is
* ~15% brighter over a bright backdrop — that step, held for the whole of
* every drag, was Kyle's "the window gets light when I drag it".
*
* 2. Discrete jumps (maximize, restore, snap, DPI): the DWM zoom animation
* scales a SNAPSHOT of the window, not the window — the accent visual