refactor(core): return Window on create_window API (#3211)

This commit is contained in:
Lucas Fernandes Nogueira
2022-01-13 13:51:45 -03:00
committed by GitHub
parent d5e6046756
commit e15a8af843
2 changed files with 7 additions and 3 deletions

View File

@@ -0,0 +1,5 @@
---
"tauri": minor
---
**Breaking change:** Return `Window` on `App` and `AppHandle`'s `create_window` function.

View File

@@ -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,
@@ -390,8 +390,7 @@ macro_rules! shared_app_impl {
window_builder,
webview_attributes,
label,
))?;
Ok(())
))
}
#[cfg(feature = "system-tray")]