File tree Expand file tree Collapse file tree 2 files changed +6
-6
lines changed
Expand file tree Collapse file tree 2 files changed +6
-6
lines changed Original file line number Diff line number Diff line change @@ -84,9 +84,9 @@ impl ApplicationHandler for Glass {
8484 if !runner_state. is_init {
8585 // Create windows from initial configs
8686 let mut winit_windows = vec ! [ ] ;
87- for & window_config in config. window_configs . iter ( ) {
87+ for window_config in config. window_configs . iter ( ) {
8888 winit_windows. push ( (
89- window_config,
89+ window_config. clone ( ) ,
9090 GlassContext :: create_winit_window ( event_loop, & window_config) . unwrap ( ) ,
9191 ) )
9292 }
@@ -485,7 +485,7 @@ impl GlassContext {
485485 ) -> Result < Arc < Window > , GlassError > {
486486 let mut window_attributes = Window :: default_attributes ( )
487487 . with_inner_size ( winit:: dpi:: LogicalSize :: new ( config. width , config. height ) )
488- . with_title ( config. title ) ;
488+ . with_title ( config. title . clone ( ) ) ;
489489
490490 // Min size
491491 if let Some ( inner_size) = config. min_size {
Original file line number Diff line number Diff line change @@ -12,9 +12,9 @@ use winit::{
1212
1313use crate :: device_context:: DeviceContext ;
1414
15- #[ derive( Debug , Copy , Clone ) ]
15+ #[ derive( Debug , Clone ) ]
1616pub struct WindowConfig {
17- pub title : & ' static str ,
17+ pub title : String ,
1818 pub width : u32 ,
1919 pub height : u32 ,
2020 pub pos : WindowPos ,
@@ -30,7 +30,7 @@ pub struct WindowConfig {
3030impl Default for WindowConfig {
3131 fn default ( ) -> Self {
3232 Self {
33- title : "App" ,
33+ title : "App" . to_string ( ) ,
3434 width : 1920 ,
3535 height : 1080 ,
3636 pos : WindowPos :: Centered ,
You can’t perform that action at this time.
0 commit comments