summaryrefslogtreecommitdiffstats
path: root/examples/multi_window
diff options
context:
space:
mode:
authorLibravatar Bingus <shankern@protonmail.com>2023-07-24 14:32:59 -0700
committerLibravatar Bingus <shankern@protonmail.com>2023-07-24 14:32:59 -0700
commit83c7870c569a2976923ee6243a19813094d44673 (patch)
tree70e3263bd9c7ac02ed8107d854edfccb5e90245f /examples/multi_window
parentd53ccc857da4d4cda769904342aeb5a82a64f146 (diff)
downloadiced-83c7870c569a2976923ee6243a19813094d44673.tar.gz
iced-83c7870c569a2976923ee6243a19813094d44673.tar.bz2
iced-83c7870c569a2976923ee6243a19813094d44673.zip
Moved `exit_on_close_request` to window settings. This now controls whether each INDIVIDUAL window should close on CloseRequested events.
Diffstat (limited to 'examples/multi_window')
-rw-r--r--examples/multi_window/src/main.rs6
1 files changed, 2 insertions, 4 deletions
diff --git a/examples/multi_window/src/main.rs b/examples/multi_window/src/main.rs
index 58604702..51ec3595 100644
--- a/examples/multi_window/src/main.rs
+++ b/examples/multi_window/src/main.rs
@@ -8,10 +8,7 @@ use iced::{
use std::collections::HashMap;
fn main() -> iced::Result {
- Example::run(Settings {
- exit_on_close_request: false,
- ..Default::default()
- })
+ Example::run(Settings::default())
}
#[derive(Default)]
@@ -111,6 +108,7 @@ impl multi_window::Application for Example {
id,
window::Settings {
position: self.next_window_pos,
+ exit_on_close_request: count % 2 == 0,
..Default::default()
},
);