bevy/tools/example-showcase/extra-window-resized-events.patch

18 lines
638 B
Diff
Raw Normal View History

diff --git a/crates/bevy_winit/src/lib.rs b/crates/bevy_winit/src/lib.rs
index 91c9858c7..9f93f05d0 100644
--- a/crates/bevy_winit/src/lib.rs
+++ b/crates/bevy_winit/src/lib.rs
@@ -510,6 +510,12 @@ pub fn winit_runner(mut app: App) {
runner_state.window_event_received = true;
+ event_writers.window_resized.send(WindowResized {
+ window: window_entity,
+ width: window.width(),
+ height: window.height(),
+ });
+
match event {
WindowEvent::Resized(size) => {
window