diff --git a/crates/snowbound/src/windows.rs b/crates/snowbound/src/windows.rs index 9c0965e64a2476cd268070d42640568fdbafa7c2..be8b64d254e8ff49d76aadf877c8b6c94492ba77 100644 --- a/crates/snowbound/src/windows.rs +++ b/crates/snowbound/src/windows.rs @@ -434,6 +434,20 @@ fn glass_frame( extend_frame(hwnd); None } + // Transparent frames show the window's GDI surface, which the desktop fills white + // until painted; black is clear over the extended frame. + wm::WM_ERASEBKGND => { + let mut client = RECT::default(); + unsafe { + wm::GetClientRect(hwnd, &mut client); + Gdi::FillRect( + wparam as Gdi::HDC, + &client, + Gdi::GetStockObject(Gdi::BLACK_BRUSH), + ); + } + Some(1) + } _ => None, } }