refactor: refactor parent APIs on WindowBuilder (#8622)

* refactor: refactor parent APIs on `WindowBuilder`

closes #8587 #1643

* fix build

* clippy

* support parent in JS and config

* change files

* fix build

* clippy

* fix doctests

* fix linux build

* fix doctests

* update docs

* fix api, update example to use JS API

* fix merge

* lint

* fix tests on windows

---------

Co-authored-by: Lucas Nogueira <lucas@tauri.studio>
This commit is contained in:
Amr Bashir
2024-01-31 18:59:14 +02:00
committed by GitHub
parent a2fc3a6357
commit 9eaeb5a8cd
28 changed files with 465 additions and 151 deletions

View File

@@ -0,0 +1,5 @@
---
'@tauri-apps/api': 'patch:feat'
---
Add `parent` option when creating a window.

View File

@@ -0,0 +1,5 @@
---
'tauri': 'patch:feat'
---
Add `WindowBuilder::parent` which is a convenient wrapper around parent functionality for Windows, Linux and macOS. Also added `WindowBuilder::owner` on Windows only. Also added `WindowBuilder::transient_for` and `WindowBuilder::transient_for_raw` on Linux only.

View File

@@ -0,0 +1,5 @@
---
'tauri': 'patch:breaking'
---
Renamed `WindowBuilder::owner_window` to `WindowBuilder::owner_raw` and `WindowBuilder::parent_window` to `WindowBuilder::parent_raw`.

View File

@@ -0,0 +1,6 @@
---
'tauri-runtime': 'patch'
'tauri-runtime-wry': 'patch'
---
Added `WindowBuilder::transient_for` and Renamed `WindowBuilder::owner_window` to `WindowBuilder::owner` and `WindowBuilder::parent_window` to `WindowBuilder::parent`.

View File

@@ -0,0 +1,5 @@
---
'tauri-utils': 'patch:feat'
---
Add `parent` option for window config.

View File

@@ -0,0 +1,5 @@
---
'tauri': 'patch:breaking'
---
Changed `WindowBuilder::from_config` to return a `Result<Self>`.

View File

@@ -0,0 +1,6 @@
---
'tauri-runtime': 'patch:breaking'
'tauri-runtime-wry': 'patch:breaking'
---
Changed `WindowBuilder::with_config` to take a reference to a `WindowConfig` instead of an owned value.