summaryrefslogtreecommitdiffstats
path: root/runtime/src/window.rs
diff options
context:
space:
mode:
Diffstat (limited to 'runtime/src/window.rs')
-rw-r--r--runtime/src/window.rs11
1 files changed, 7 insertions, 4 deletions
diff --git a/runtime/src/window.rs b/runtime/src/window.rs
index ee03f84f..cd27cdfe 100644
--- a/runtime/src/window.rs
+++ b/runtime/src/window.rs
@@ -218,12 +218,15 @@ pub fn close_requests() -> Subscription<Id> {
/// Opens a new window with the given [`Settings`]; producing the [`Id`]
/// of the new window on completion.
-pub fn open(settings: Settings) -> Task<Id> {
+pub fn open(settings: Settings) -> (Id, Task<Id>) {
let id = Id::unique();
- task::oneshot(|channel| {
- crate::Action::Window(Action::Open(id, settings, channel))
- })
+ (
+ id,
+ task::oneshot(|channel| {
+ crate::Action::Window(Action::Open(id, settings, channel))
+ }),
+ )
}
/// Closes the window with `id`.