File tree Expand file tree Collapse file tree 2 files changed +10
-8
lines changed
Expand file tree Collapse file tree 2 files changed +10
-8
lines changed Original file line number Diff line number Diff line change @@ -104,13 +104,15 @@ impl ApplicationHandler for Glass {
104104 if let Some ( window) = context. windows . get_mut ( & window_id) {
105105 match event {
106106 WindowEvent :: Resized ( physical_size) => {
107- // On windows, minimized app can have 0,0 size
108- if physical_size. width > 0 && physical_size. height > 0 {
109- window. configure_surface_with_size (
110- context. device_context . device ( ) ,
111- physical_size,
112- ) ;
113- is_extra_update = true ;
107+ if runner_state. is_init {
108+ // On windows, minimized app can have 0,0 size
109+ if physical_size. width > 0 && physical_size. height > 0 {
110+ window. configure_surface_with_size (
111+ context. device_context . device ( ) ,
112+ physical_size,
113+ ) ;
114+ is_extra_update = true ;
115+ }
114116 }
115117 }
116118 WindowEvent :: ScaleFactorChanged {
Original file line number Diff line number Diff line change @@ -89,7 +89,7 @@ impl GlassWindow {
8989 ) -> Result < GlassWindow , CreateSurfaceError > {
9090 let size = [ window. inner_size ( ) . width , window. inner_size ( ) . height ] ;
9191 let surface = context. instance ( ) . create_surface ( window. clone ( ) ) ?;
92- let formats = surface. get_capabilities ( & context. adapter ( ) ) . formats ;
92+ let formats = surface. get_capabilities ( context. adapter ( ) ) . formats ;
9393 if !formats. contains ( & config. surface_format ) {
9494 panic ! (
9595 "{:?} not allowed. Allowed formats: {:?}" ,
You can’t perform that action at this time.
0 commit comments