| author | |
| committer | |
| log | 1e031bc5ce597a74ec16e0cb1e609d173bec91f7 |
| tree | 4f7ec4247f7b02af955f660a585127e0918bbb41 |
| parent | b614f34cb7b240eb16060ae6e02f6ecc42624dbc |
| signature | Signed by SSH key SHA256:52mNGHRsVFBDED9IAX5pe+LRWUefqTbxEReunq21QvU |
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.51 files changed, 14 insertions(+), 0 deletions(-)
crates/snowbound/src/windows.rs+14| ... | ... | @@ -434,6 +434,20 @@ fn glass_frame( |
| 434 | 434 | extend_frame(hwnd); |
| 435 | 435 | None |
| 436 | 436 | } |
| 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 | } | |
| 437 | 451 | _ => None, |
| 438 | 452 | } |
| 439 | 453 | } |