authorgravatar for git@paperclover.netclover caruso <git@paperclover.net> 2026-10-01 17:28:25-07:00
committergravatar for git@paperclover.netclover caruso <git@paperclover.net> 2026-10-01 18:10:08-07:00
log1e031bc5ce597a74ec16e0cb1e609d173bec91f7
tree4f7ec4247f7b02af955f660a585127e0918bbb41
parentb614f34cb7b240eb16060ae6e02f6ecc42624dbc
signature Signed by SSH key SHA256:52mNGHRsVFBDED9IAX5pe+LRWUefqTbxEReunq21QvU

fix: Dark chrome over dark Mica on Windows 11 from the first frame

The window shows before its first frame, and the desktop fills the unpainted GDI surface white. Under Direct3D 12 frames go through DirectComposition over that surface, so the transparent toolbar showed white rather than Mica until a resize reallocated it. The glass frame now erases it to black, which the extended frame shows as the material. Assisted-by: claude-opus-5.5

1 files changed, 14 insertions(+), 0 deletions(-)

crates/snowbound/src/windows.rs+14
......@@ -434,6 +434,20 @@ fn glass_frame(
434434 extend_frame(hwnd);
435435 None
436436 }
437 // Transparent frames show the window's GDI surface, which the desktop fills white
438 // until painted; black is clear over the extended frame.
439 wm::WM_ERASEBKGND => {
440 let mut client = RECT::default();
441 unsafe {
442 wm::GetClientRect(hwnd, &mut client);
443 Gdi::FillRect(
444 wparam as Gdi::HDC,
445 &client,
446 Gdi::GetStockObject(Gdi::BLACK_BRUSH),
447 );
448 }
449 Some(1)
450 }
437451 _ => None,
438452 }
439453}