Skip to content

Commit

Permalink
refactor(core): return Window on create_window API (#3211)
Browse files Browse the repository at this point in the history
  • Loading branch information
lucasfernog committed Jan 13, 2022
1 parent d5e6046 commit e15a8af
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 3 deletions.
5 changes: 5 additions & 0 deletions .changes/create-window-return-window.md
@@ -0,0 +1,5 @@
---
"tauri": minor
---

**Breaking change:** Return `Window` on `App` and `AppHandle`'s `create_window` function.
5 changes: 2 additions & 3 deletions core/tauri/src/app.rs
Expand Up @@ -372,7 +372,7 @@ macro_rules! shared_app_impl {
label: impl Into<String>,
url: WindowUrl,
setup: F,
) -> crate::Result<()>
) -> crate::Result<Window<R>>
where
F: FnOnce(
<R::Dispatcher as Dispatch>::WindowBuilder,
Expand All @@ -390,8 +390,7 @@ macro_rules! shared_app_impl {
window_builder,
webview_attributes,
label,
))?;
Ok(())
))
}

#[cfg(feature = "system-tray")]
Expand Down

0 comments on commit e15a8af

Please sign in to comment.