| author | |
| committer | |
| log | c3f7869026fe3c368c667c6d6d40cfe6c7fef277 |
| tree | f5f781855f8036aeb5c3ebddd22939cc89741506 |
| parent | 22ec560def0e7769c2cfd79da312576382966e1e |
| signature | Signed by SSH key SHA256:52mNGHRsVFBDED9IAX5pe+LRWUefqTbxEReunq21QvU |
The surface already presents with AppKit's transaction, but a resize only requested a redraw,
so the window could show the previous frame stretched to the new size until the next turn of
the event loop. Resized now draws before returning. Built and tested headless; the visual
result has not yet been checked on a display.
Assisted-by: claude-opus-5.51 files changed, 3 insertions(+), 0 deletions(-)
crates/snowbound/src/main.rs+3| ... | ... | @@ -1354,6 +1354,9 @@ impl ApplicationHandler<UserEvent> for App { |
| 1354 | 1354 | .surface |
| 1355 | 1355 | .configure(&state.renderer.device, &state.config); |
| 1356 | 1356 | state.changed()?; |
| 1357 | // Present inside AppKit's resize transaction; a redraw on the next turn | |
| 1358 | // lets the window show the previous frame at the new size. | |
| 1359 | state.draw()?; | |
| 1357 | 1360 | } |
| 1358 | 1361 | } |
| 1359 | 1362 | WindowEvent::ScaleFactorChanged { scale_factor, .. } => { |