 8cf5fbbf94
			
		
	
	
		8cf5fbbf94
		
			
		
	
	
	
	
		
			
			Follow up to #11057
Implemented suggestions from reviewers from: a simpler
fit_canvas_to_parent leads to an explicit CSS setting to the canvas.
From my understanding, it has do be set after wgpu creation due to wgpu
overriding the canvas width/height:
4400a58470/examples/src/utils.rs (L68-L74)
# Changelog
- Re-enable a `fit_canvas_to_parent`, it's removal from
https://github.com/bevyengine/bevy/pull/11057 was problematic. Still,
its inner working is more simple than before: bevy doesn't handle its
resizing, winit does.
## Migration Guide
- Cancels the migration from
https://github.com/bevyengine/bevy/pull/11057
		
	
			
		
			
				
	
	
		
			17 lines
		
	
	
		
			628 B
		
	
	
	
		
			Diff
		
	
	
	
	
	
			
		
		
	
	
			17 lines
		
	
	
		
			628 B
		
	
	
	
		
			Diff
		
	
	
	
	
	
| diff --git a/crates/bevy_window/src/window.rs b/crates/bevy_window/src/window.rs
 | |
| index 87cdfb050..1d87a0bf5 100644
 | |
| --- a/crates/bevy_window/src/window.rs
 | |
| +++ b/crates/bevy_window/src/window.rs
 | |
| @@ -266,9 +266,9 @@ impl Default for Window {
 | |
|              transparent: false,
 | |
|              focused: true,
 | |
|              window_level: Default::default(),
 | |
| -            fit_canvas_to_parent: false,
 | |
| +            fit_canvas_to_parent: true,
 | |
|              prevent_default_event_handling: true,
 | |
| -            canvas: None,
 | |
| +            canvas: Some("#bevy".to_string()),
 | |
|              window_theme: None,
 | |
|              visible: true,
 | |
|          }
 |