File tree 1 file changed +6
-6
lines changed
1 file changed +6
-6
lines changed Original file line number Diff line number Diff line change @@ -204,12 +204,6 @@ impl State {
204
204
205
205
self . egui_input . time = Some ( self . start_time . elapsed ( ) . as_secs_f64 ( ) ) ;
206
206
207
- // TODO remove this in winit 0.29
208
- // This hack make the window outer_position and size to be valid, X11 Only
209
- // That was happending because winit get the window state before the compositor adds decorations!
210
- #[ cfg( all( feature = "x11" , target_os = "linux" ) ) ]
211
- window. set_maximized ( window. is_maximized ( ) ) ;
212
-
213
207
// On Windows, a minimized window will have 0 width and height.
214
208
// See: https://github.com/rust-windowing/winit/issues/208
215
209
// This solves an issue where egui window positions would be changed when minimizing on Windows.
@@ -1403,6 +1397,12 @@ pub fn apply_viewport_builder_to_new_window(window: &Window, builder: &ViewportB
1403
1397
log:: warn!( "set_cursor_hittest failed: {err}" ) ;
1404
1398
}
1405
1399
}
1400
+
1401
+ // TODO remove this in winit 0.29
1402
+ // This hack make the window outer_position and size to be valid, X11 Only
1403
+ // That was happending because winit get the window state before the compositor adds decorations!
1404
+ #[ cfg( all( feature = "x11" , target_os = "linux" ) ) ]
1405
+ window. set_maximized ( builder. maximized . unwrap_or ( false ) ) ;
1406
1406
}
1407
1407
1408
1408
// ---------------------------------------------------------------------------
You can’t perform that action at this time.
0 commit comments