@@ -302,6 +302,7 @@ pub(crate) struct CachedCursorOptions(CursorOptions);
302302/// - [`Window::transparent`] cannot be changed after the window is created.
303303/// - [`Window::canvas`] cannot be changed after the window is created.
304304/// - [`Window::focused`] cannot be manually changed to `false` after the window is created.
305+ #[ tracing:: instrument( skip_all) ]
305306pub ( crate ) fn changed_windows (
306307 mut commands : Commands ,
307308 mut changed_windows : Query <
@@ -377,6 +378,7 @@ pub(crate) fn changed_windows(
377378 }
378379
379380 if window. resolution != cache. resolution {
381+ warn ! ( "WindowResolution has changed." ) ;
380382
381383 let cache_physical_size = PhysicalSize :: new (
382384 cache. resolution . physical_width ( ) ,
@@ -390,6 +392,7 @@ pub(crate) fn changed_windows(
390392 if cache_physical_size != requested_physical_size {
391393 // In `None` case, the request will be handled by winit::event::WindowEvent::Resized
392394 if let Some ( new_physical_size) = winit_window. request_inner_size ( requested_physical_size) {
395+ warn ! ( "Winit resize request handled instantly: changing the resolution. Sending WindowResized events." ) ;
393396 let event = react_to_resize ( entity, & mut window, new_physical_size) ;
394397 // Need to send two very similar events because different systems rely on those.
395398 window_resized. write ( event. clone ( ) ) ;
@@ -402,6 +405,7 @@ pub(crate) fn changed_windows(
402405
403406 if cache_scale_factor != requested_scale_factor {
404407 // If the scale factor has changed we don't query anything from winit, but send events for camera system to handle.
408+ warn ! ( "Scale factor has changed. Sending ScaleFactor Message." ) ;
405409 let event = WindowScaleFactorChanged { scale_factor : requested_scale_factor as f64 , window : entity} ;
406410 // Need to send two very similar events because different systems rely on those.
407411 window_rescaled. write ( event. clone ( ) ) ;
0 commit comments