diff options
Diffstat (limited to 'examples')
| -rw-r--r-- | examples/multi_window/src/main.rs | 11 | 
1 files changed, 7 insertions, 4 deletions
| diff --git a/examples/multi_window/src/main.rs b/examples/multi_window/src/main.rs index 3dcb58f5..ab09116e 100644 --- a/examples/multi_window/src/main.rs +++ b/examples/multi_window/src/main.rs @@ -40,12 +40,13 @@ enum Message {  impl Example {      fn new() -> (Self, Task<Message>) { +        let (_id, open) = window::open(window::Settings::default()); +          (              Self {                  windows: BTreeMap::new(),              }, -            window::open(window::Settings::default()) -                .map(Message::WindowOpened), +            open.map(Message::WindowOpened),          )      } @@ -74,10 +75,12 @@ impl Example {                              },                          ); -                        window::open(window::Settings { +                        let (_id, open) = window::open(window::Settings {                              position,                              ..window::Settings::default() -                        }) +                        }); + +                        open                      })                      .map(Message::WindowOpened)              } | 
