refactor: allow resetting the main window id
This commit is contained in:
parent
b44fe2c0b6
commit
cf3ba4ca07
5 changed files with 29 additions and 24 deletions
|
|
@ -419,9 +419,9 @@ pub fn run<App: Application>(flags: App::Flags) -> iced::Result {
|
|||
cosmic::Cosmic::update,
|
||||
cosmic::Cosmic::view,
|
||||
);
|
||||
if core.main_window.get().is_none() {
|
||||
if core.main_window.is_none() {
|
||||
app = app.window(window_settings.clone());
|
||||
_ = core.main_window.set(iced_core::window::Id::RESERVED);
|
||||
core.main_window = Some(iced_core::window::Id::RESERVED);
|
||||
}
|
||||
app.subscription(cosmic::Cosmic::subscription)
|
||||
.style(cosmic::Cosmic::style)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue