Skip to content

Commit e15a8af

Browse files
authored
refactor(core): return Window on create_window API (#3211)
1 parent d5e6046 commit e15a8af

2 files changed

Lines changed: 7 additions & 3 deletions

File tree

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
"tauri": minor
3+
---
4+
5+
**Breaking change:** Return `Window` on `App` and `AppHandle`'s `create_window` function.

core/tauri/src/app.rs

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -372,7 +372,7 @@ macro_rules! shared_app_impl {
372372
label: impl Into<String>,
373373
url: WindowUrl,
374374
setup: F,
375-
) -> crate::Result<()>
375+
) -> crate::Result<Window<R>>
376376
where
377377
F: FnOnce(
378378
<R::Dispatcher as Dispatch>::WindowBuilder,
@@ -390,8 +390,7 @@ macro_rules! shared_app_impl {
390390
window_builder,
391391
webview_attributes,
392392
label,
393-
))?;
394-
Ok(())
393+
))
395394
}
396395

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

0 commit comments

Comments
 (0)