diff --git a/glutin/src/application.rs b/glutin/src/application.rs index bcdd9e33..93877734 100644 --- a/glutin/src/application.rs +++ b/glutin/src/application.rs @@ -155,6 +155,19 @@ pub fn run( context.window().scale_factor() * new_scale_factor, ); + // We relayout the UI with the new logical size. + // The queue is empty, therefore this will never produce + // a `Command`. + // + // TODO: Properly queue `WindowResized` and `CursorMoved` + // events. + let _ = state.update( + clipboard.as_ref().map(|c| c as _), + viewport.logical_size(), + &mut renderer, + &mut debug, + ); + scale_factor = new_scale_factor; } } diff --git a/winit/src/application.rs b/winit/src/application.rs index b512aace..cb1bbf1e 100644 --- a/winit/src/application.rs +++ b/winit/src/application.rs @@ -236,6 +236,19 @@ pub fn run( window.scale_factor() * new_scale_factor, ); + // We relayout the UI with the new logical size. + // The queue is empty, therefore this will never produce + // a `Command`. + // + // TODO: Properly queue `WindowResized` and `CursorMoved` + // events. + let _ = state.update( + clipboard.as_ref().map(|c| c as _), + viewport.logical_size(), + &mut renderer, + &mut debug, + ); + scale_factor = new_scale_factor; } }