diff --git a/Cargo.toml b/Cargo.toml index 4e105a1..76e135a 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -18,6 +18,7 @@ path = "src/main.rs" [dependencies] log = "0.4.14" druid = "0.7.0" +druid-shell = "0.7.0" rodio = "0.15.0" serde = { version = "1.0.136", features = ["derive"] } toml = "0.5.8" diff --git a/src/delegate.rs b/src/delegate.rs index 2d58d64..5533b13 100644 --- a/src/delegate.rs +++ b/src/delegate.rs @@ -61,11 +61,17 @@ impl AppDelegate for Delegate { id: WindowId, _data: &mut state::App, _env: &Env, - _ctx: &mut DelegateCtx, + ctx: &mut DelegateCtx, ) { info!("Window added, id: {:?}", id); if self.status_win_id.is_none() { self.status_win_id = Some(id); + } else { + ctx.submit_command( + druid::commands::CONFIGURE_WINDOW + .with(druid::WindowConfig::default().set_level(druid_shell::WindowLevel::Modal)) + .to(Target::Window(id)), + ) } } }