Skip to content

Commit

Permalink
Add special case when window is resized to zero
Browse files Browse the repository at this point in the history
  • Loading branch information
PoignardAzur committed Dec 5, 2024
1 parent 3aebc98 commit 9ca2809
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions masonry/src/event_loop_runner.rs
Original file line number Diff line number Diff line change
Expand Up @@ -479,6 +479,12 @@ impl MasonryState<'_> {
event_loop.exit();
}
WinitWindowEvent::Resized(size) => {
if size.width == 0 || size.height == 0 {
self.handle_suspended(event_loop);
return;
} else if let WindowState::Suspended { .. } = &mut self.window {
self.handle_resumed(event_loop);
}
self.render_root
.handle_window_event(WindowEvent::Resize(size));
}
Expand Down

0 comments on commit 9ca2809

Please sign in to comment.