From 76bb206b7aae4917f3b27476aed397e026a48f08 Mon Sep 17 00:00:00 2001 From: Caesar Schinas Date: Thu, 13 Oct 2022 11:28:54 +0100 Subject: [PATCH 1/6] feat(macos): add `automatic_tabbing` option, closes #3912 --- .changes/macos-automatic-tabbing.md | 6 ++++++ core/tauri-runtime-wry/src/lib.rs | 9 ++++++++- core/tauri-runtime/src/webview.rs | 5 +++++ core/tauri-utils/src/config.rs | 8 +++++++- core/tauri/src/test/mock_runtime.rs | 5 +++++ core/tauri/src/window.rs | 8 ++++++++ examples/multiwindow/main.rs | 1 + examples/multiwindow/tauri.conf.json | 2 ++ tooling/api/src/window.ts | 4 ++++ tooling/cli/schema.json | 7 ++++++- 10 files changed, 52 insertions(+), 3 deletions(-) create mode 100644 .changes/macos-automatic-tabbing.md diff --git a/.changes/macos-automatic-tabbing.md b/.changes/macos-automatic-tabbing.md new file mode 100644 index 00000000000..4d8b11355b3 --- /dev/null +++ b/.changes/macos-automatic-tabbing.md @@ -0,0 +1,6 @@ +--- +'tauri': minor +"tauri-runtime-wry": minor +--- + +Add `automatic_tabbing` option for macOS windows. diff --git a/core/tauri-runtime-wry/src/lib.rs b/core/tauri-runtime-wry/src/lib.rs index 0eb4076e55c..8bd73be907a 100644 --- a/core/tauri-runtime-wry/src/lib.rs +++ b/core/tauri-runtime-wry/src/lib.rs @@ -710,7 +710,8 @@ impl WindowBuilder for WindowBuilderWrapper { { window = window .hidden_title(config.hidden_title) - .title_bar_style(config.title_bar_style); + .title_bar_style(config.title_bar_style) + .automatic_tabbing(config.automatic_tabbing); } #[cfg(any(not(target_os = "macos"), feature = "macos-private-api"))] @@ -878,6 +879,12 @@ impl WindowBuilder for WindowBuilderWrapper { self } + #[cfg(target_os = "macos")] + fn automatic_tabbing(mut self, enabled: bool) -> Self { + self.inner = self.inner.with_automatic_window_tabbing(enabled); + self + } + fn icon(mut self, icon: Icon) -> Result { self.inner = self .inner diff --git a/core/tauri-runtime/src/webview.rs b/core/tauri-runtime/src/webview.rs index 8bdd9af339f..320f1d8552e 100644 --- a/core/tauri-runtime/src/webview.rs +++ b/core/tauri-runtime/src/webview.rs @@ -210,6 +210,11 @@ pub trait WindowBuilder: WindowBuilderBase { #[must_use] fn hidden_title(self, hidden: bool) -> Self; + /// Sets whether the system can automatically organize windows into tabs. + #[cfg(target_os = "macos")] + #[must_use] + fn automatic_tabbing(self, enabled: bool) -> Self; + /// Forces a theme or uses the system settings if None was provided. fn theme(self, theme: Option) -> Self; diff --git a/core/tauri-utils/src/config.rs b/core/tauri-utils/src/config.rs index 6ec40950315..f816dee0cf6 100644 --- a/core/tauri-utils/src/config.rs +++ b/core/tauri-utils/src/config.rs @@ -870,6 +870,9 @@ pub struct WindowConfig { /// If `true`, sets the window title to be hidden on macOS. #[serde(default, alias = "hidden-title")] pub hidden_title: bool, + /// Sets whether macOS can automatically organize windows into tabs. + #[serde(default, alias = "automatic-tabbing")] + pub automatic_tabbing: bool, } impl Default for WindowConfig { @@ -901,6 +904,7 @@ impl Default for WindowConfig { theme: None, title_bar_style: Default::default(), hidden_title: false, + automatic_tabbing: true, } } } @@ -3032,6 +3036,7 @@ mod build { let theme = opt_lit(self.theme.as_ref()); let title_bar_style = &self.title_bar_style; let hidden_title = self.hidden_title; + let automatic_tabbing = self.automatic_tabbing; literal_struct!( tokens, @@ -3061,7 +3066,8 @@ mod build { skip_taskbar, theme, title_bar_style, - hidden_title + hidden_title, + automatic_tabbing ); } } diff --git a/core/tauri/src/test/mock_runtime.rs b/core/tauri/src/test/mock_runtime.rs index 8a19ffdc9ce..88675bb0240 100644 --- a/core/tauri/src/test/mock_runtime.rs +++ b/core/tauri/src/test/mock_runtime.rs @@ -283,6 +283,11 @@ impl WindowBuilder for MockWindowBuilder { self } + #[cfg(target_os = "macos")] + fn automatic_tabbing(self, enabled: bool) -> Self { + self + } + fn theme(self, theme: Option) -> Self { self } diff --git a/core/tauri/src/window.rs b/core/tauri/src/window.rs index d5196ea46e1..667fc026d53 100644 --- a/core/tauri/src/window.rs +++ b/core/tauri/src/window.rs @@ -462,6 +462,14 @@ impl<'a, R: Runtime> WindowBuilder<'a, R> { self } + /// Sets whether macOS can automatically organize windows into tabs. + #[cfg(target_os = "macos")] + #[must_use] + pub fn automatic_tabbing(mut self, enabled: bool) -> Self { + self.window_builder = self.window_builder.automatic_tabbing(enabled); + self + } + // ------------------------------------------- Webview attributes ------------------------------------------- /// Adds the provided JavaScript to a list of scripts that should be run after the global object has been created, diff --git a/examples/multiwindow/main.rs b/examples/multiwindow/main.rs index b9251e50468..7b03edf83a7 100644 --- a/examples/multiwindow/main.rs +++ b/examples/multiwindow/main.rs @@ -24,6 +24,7 @@ fn main() { tauri::WindowUrl::App("index.html".into()), ) .title("Tauri - Rust") + .automatic_tabbing(false) .build()?; Ok(()) }) diff --git a/examples/multiwindow/tauri.conf.json b/examples/multiwindow/tauri.conf.json index 1c50fec1e85..21a3dae8b32 100644 --- a/examples/multiwindow/tauri.conf.json +++ b/examples/multiwindow/tauri.conf.json @@ -35,12 +35,14 @@ { "label": "Main", "title": "Tauri - Main", + "automaticTabbing": false, "width": 800, "height": 600 }, { "label": "Secondary", "title": "Tauri - Secondary", + "automaticTabbing": false, "width": 600, "height": 400 } diff --git a/tooling/api/src/window.ts b/tooling/api/src/window.ts index 0a4e831a28b..c6368387b72 100644 --- a/tooling/api/src/window.ts +++ b/tooling/api/src/window.ts @@ -2042,6 +2042,10 @@ interface WindowOptions { * If `true`, sets the window title to be hidden on macOS. */ hiddenTitle?: boolean + /** + * Sets whether macOS can automatically organize windows into tabs. + */ + automaticTabbing?: boolean /** * The user agent for the webview. */ diff --git a/tooling/cli/schema.json b/tooling/cli/schema.json index 7357c7409f6..9729a13d8ee 100644 --- a/tooling/cli/schema.json +++ b/tooling/cli/schema.json @@ -670,6 +670,11 @@ "description": "If `true`, sets the window title to be hidden on macOS.", "default": false, "type": "boolean" + }, + "automaticTabbing": { + "description": "Sets whether macOS can automatically organize windows into tabs.", + "default": true, + "type": "boolean" } }, "additionalProperties": false @@ -2725,4 +2730,4 @@ "additionalProperties": true } } -} \ No newline at end of file +} From dbd2936076ea02155675bdf21d3e5a8de45fa525 Mon Sep 17 00:00:00 2001 From: Caesar Schinas Date: Thu, 13 Oct 2022 11:34:02 +0100 Subject: [PATCH 2/6] style: whitespace --- tooling/api/src/window.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tooling/api/src/window.ts b/tooling/api/src/window.ts index c6368387b72..f26cc4273e4 100644 --- a/tooling/api/src/window.ts +++ b/tooling/api/src/window.ts @@ -2045,7 +2045,7 @@ interface WindowOptions { /** * Sets whether macOS can automatically organize windows into tabs. */ - automaticTabbing?: boolean + automaticTabbing?: boolean /** * The user agent for the webview. */ From 7ab537dc0d3db68ea1686556d338234e97e27437 Mon Sep 17 00:00:00 2001 From: Caesar Schinas Date: Thu, 13 Oct 2022 13:17:41 +0100 Subject: [PATCH 3/6] fix: remove automatic_tabbing from window example --- examples/multiwindow/main.rs | 1 - 1 file changed, 1 deletion(-) diff --git a/examples/multiwindow/main.rs b/examples/multiwindow/main.rs index 7b03edf83a7..b9251e50468 100644 --- a/examples/multiwindow/main.rs +++ b/examples/multiwindow/main.rs @@ -24,7 +24,6 @@ fn main() { tauri::WindowUrl::App("index.html".into()), ) .title("Tauri - Rust") - .automatic_tabbing(false) .build()?; Ok(()) }) From 74e778d82134f7d30037f4882ea298ceb87b2892 Mon Sep 17 00:00:00 2001 From: Lucas Nogueira Date: Tue, 18 Oct 2022 10:34:38 -0300 Subject: [PATCH 4/6] feat: add tabbing identifier --- .changes/automatic-tabbing.md | 6 ++ .changes/macos-automatic-tabbing.md | 6 -- .changes/tabbing-identifier-api.md | 5 + .changes/tabbing-identifier.md | 8 ++ core/tauri-runtime-wry/src/lib.rs | 23 ++++- core/tauri-runtime/src/webview.rs | 6 +- core/tauri-utils/src/config.rs | 14 +-- core/tauri/src/test/mock_runtime.rs | 2 +- core/tauri/src/window.rs | 8 +- examples/multiwindow/index.html | 145 ++++++++++++++------------- examples/multiwindow/main.rs | 11 +- examples/multiwindow/tauri.conf.json | 4 +- tooling/api/src/window.ts | 6 +- tooling/cli/Cargo.lock | 4 +- tooling/cli/schema.json | 12 ++- 15 files changed, 153 insertions(+), 107 deletions(-) create mode 100644 .changes/automatic-tabbing.md delete mode 100644 .changes/macos-automatic-tabbing.md create mode 100644 .changes/tabbing-identifier-api.md create mode 100644 .changes/tabbing-identifier.md diff --git a/.changes/automatic-tabbing.md b/.changes/automatic-tabbing.md new file mode 100644 index 00000000000..d136547b0de --- /dev/null +++ b/.changes/automatic-tabbing.md @@ -0,0 +1,6 @@ +--- +"tauri": minor +"tauri-runtime-wry": minor +--- + +Disable automatic window tabbing on macOS when the `tabbing_identifier` option is not defined, the window is transparent or does not have decorations. diff --git a/.changes/macos-automatic-tabbing.md b/.changes/macos-automatic-tabbing.md deleted file mode 100644 index 4d8b11355b3..00000000000 --- a/.changes/macos-automatic-tabbing.md +++ /dev/null @@ -1,6 +0,0 @@ ---- -'tauri': minor -"tauri-runtime-wry": minor ---- - -Add `automatic_tabbing` option for macOS windows. diff --git a/.changes/tabbing-identifier-api.md b/.changes/tabbing-identifier-api.md new file mode 100644 index 00000000000..66d69598156 --- /dev/null +++ b/.changes/tabbing-identifier-api.md @@ -0,0 +1,5 @@ +--- +"api": minor +--- + +Added `tabbingIdentifier` window option for macOS. diff --git a/.changes/tabbing-identifier.md b/.changes/tabbing-identifier.md new file mode 100644 index 00000000000..0e3b3f18170 --- /dev/null +++ b/.changes/tabbing-identifier.md @@ -0,0 +1,8 @@ +--- +"tauri": minor +"tauri-runtime": minor +"tauri-runtime-wry": minor +"api": minor +--- + +Added `tabbing_identifier` to the window builder on macOS. diff --git a/core/tauri-runtime-wry/src/lib.rs b/core/tauri-runtime-wry/src/lib.rs index 2e5fa60507a..396331211dc 100644 --- a/core/tauri-runtime-wry/src/lib.rs +++ b/core/tauri-runtime-wry/src/lib.rs @@ -680,6 +680,8 @@ impl From for CursorIconWrapper { pub struct WindowBuilderWrapper { inner: WryWindowBuilder, center: bool, + #[cfg(target_os = "macos")] + tabbing_identifier: Option, menu: Option, } @@ -710,8 +712,10 @@ impl WindowBuilder for WindowBuilderWrapper { { window = window .hidden_title(config.hidden_title) - .title_bar_style(config.title_bar_style) - .automatic_tabbing(config.automatic_tabbing); + .title_bar_style(config.title_bar_style); + if let Some(identifier) = &config.tabbing_identifier { + window = window.tabbing_identifier(identifier); + } } #[cfg(any(not(target_os = "macos"), feature = "macos-private-api"))] @@ -880,8 +884,9 @@ impl WindowBuilder for WindowBuilderWrapper { } #[cfg(target_os = "macos")] - fn automatic_tabbing(mut self, enabled: bool) -> Self { - self.inner = self.inner.with_automatic_window_tabbing(enabled); + fn tabbing_identifier(mut self, identifier: &str) -> Self { + self.inner = self.inner.with_tabbing_identifier(identifier); + self.tabbing_identifier.replace(identifier.into()); self } @@ -2937,6 +2942,16 @@ fn create_webview( .with_drag_and_drop(webview_attributes.file_drop_handler_enabled); } + #[cfg(target_os = "macos")] + { + if window_builder.tabbing_identifier.is_none() + || window_builder.inner.window.transparent + || !window_builder.inner.window.decorations + { + window_builder.inner = window_builder.inner.with_automatic_window_tabbing(false); + } + } + let is_window_transparent = window_builder.inner.window.transparent; let menu_items = if let Some(menu) = window_builder.menu { let mut menu_items = HashMap::new(); diff --git a/core/tauri-runtime/src/webview.rs b/core/tauri-runtime/src/webview.rs index 6e335aacb76..87c03dd3770 100644 --- a/core/tauri-runtime/src/webview.rs +++ b/core/tauri-runtime/src/webview.rs @@ -219,10 +219,12 @@ pub trait WindowBuilder: WindowBuilderBase { #[must_use] fn hidden_title(self, hidden: bool) -> Self; - /// Sets whether the system can automatically organize windows into tabs. + /// Defines the window [tabbing identifier]. + /// + /// [tabbing identifier]: #[cfg(target_os = "macos")] #[must_use] - fn automatic_tabbing(self, enabled: bool) -> Self; + fn tabbing_identifier(self, identifier: &str) -> Self; /// Forces a theme or uses the system settings if None was provided. fn theme(self, theme: Option) -> Self; diff --git a/core/tauri-utils/src/config.rs b/core/tauri-utils/src/config.rs index 1d131566c55..4c33b9aed7e 100644 --- a/core/tauri-utils/src/config.rs +++ b/core/tauri-utils/src/config.rs @@ -873,9 +873,11 @@ pub struct WindowConfig { /// Whether clicking an inactive window also clicks through to the webview. #[serde(default, alias = "accept-first-mouse")] pub accept_first_mouse: bool, - /// Sets whether macOS can automatically organize windows into tabs. - #[serde(default, alias = "automatic-tabbing")] - pub automatic_tabbing: bool, + /// Defines the window [tabbing identifier]. + /// + /// [tabbing identifier]: + #[serde(default, alias = "tabbing-identifier")] + pub tabbing_identifier: Option, } impl Default for WindowConfig { @@ -908,7 +910,7 @@ impl Default for WindowConfig { title_bar_style: Default::default(), hidden_title: false, accept_first_mouse: false, - automatic_tabbing: true, + tabbing_identifier: None, } } } @@ -3041,7 +3043,7 @@ mod build { let title_bar_style = &self.title_bar_style; let hidden_title = self.hidden_title; let accept_first_mouse = self.accept_first_mouse; - let automatic_tabbing = self.automatic_tabbing; + let tabbing_identifier = opt_str_lit(self.tabbing_identifier.as_ref()); literal_struct!( tokens, @@ -3073,7 +3075,7 @@ mod build { title_bar_style, hidden_title, accept_first_mouse, - automatic_tabbing + tabbing_identifier ); } } diff --git a/core/tauri/src/test/mock_runtime.rs b/core/tauri/src/test/mock_runtime.rs index 88675bb0240..166766a6fc1 100644 --- a/core/tauri/src/test/mock_runtime.rs +++ b/core/tauri/src/test/mock_runtime.rs @@ -284,7 +284,7 @@ impl WindowBuilder for MockWindowBuilder { } #[cfg(target_os = "macos")] - fn automatic_tabbing(self, enabled: bool) -> Self { + fn tabbing_identifier(self, identifier: &str) -> Self { self } diff --git a/core/tauri/src/window.rs b/core/tauri/src/window.rs index 27f0be17f9e..ea04ba6b983 100644 --- a/core/tauri/src/window.rs +++ b/core/tauri/src/window.rs @@ -462,11 +462,13 @@ impl<'a, R: Runtime> WindowBuilder<'a, R> { self } - /// Sets whether macOS can automatically organize windows into tabs. + /// Defines the window [tabbing identifier]. + /// + /// [tabbing identifier]: #[cfg(target_os = "macos")] #[must_use] - pub fn automatic_tabbing(mut self, enabled: bool) -> Self { - self.window_builder = self.window_builder.automatic_tabbing(enabled); + pub fn tabbing_identifier(mut self, identifier: &str) -> Self { + self.window_builder = self.window_builder.tabbing_identifier(identifier); self } diff --git a/examples/multiwindow/index.html b/examples/multiwindow/index.html index 4bfe319e146..86d4907dc55 100644 --- a/examples/multiwindow/index.html +++ b/examples/multiwindow/index.html @@ -1,84 +1,89 @@ - - - - -
-
-
+ + + - - - + createWindowMessageBtn(label) + } + + + + \ No newline at end of file diff --git a/examples/multiwindow/main.rs b/examples/multiwindow/main.rs index b9251e50468..e6a7172a10f 100644 --- a/examples/multiwindow/main.rs +++ b/examples/multiwindow/main.rs @@ -18,13 +18,16 @@ fn main() { }); }) .setup(|app| { - WindowBuilder::new( + let mut builder = WindowBuilder::new( app, "Rust".to_string(), tauri::WindowUrl::App("index.html".into()), - ) - .title("Tauri - Rust") - .build()?; + ); + #[cfg(target_os = "macos")] + { + builder = builder.tabbing_identifier("Rust"); + } + let _window = builder.title("Tauri - Rust").build()?; Ok(()) }) .run(tauri::generate_context!( diff --git a/examples/multiwindow/tauri.conf.json b/examples/multiwindow/tauri.conf.json index 21a3dae8b32..a419c9a3016 100644 --- a/examples/multiwindow/tauri.conf.json +++ b/examples/multiwindow/tauri.conf.json @@ -35,14 +35,14 @@ { "label": "Main", "title": "Tauri - Main", - "automaticTabbing": false, + "tabbingIdentifier": "Main", "width": 800, "height": 600 }, { "label": "Secondary", "title": "Tauri - Secondary", - "automaticTabbing": false, + "tabbingIdentifier": "Secondary", "width": 600, "height": 400 } diff --git a/tooling/api/src/window.ts b/tooling/api/src/window.ts index 83957d6f0b6..902c9245310 100644 --- a/tooling/api/src/window.ts +++ b/tooling/api/src/window.ts @@ -2047,9 +2047,11 @@ interface WindowOptions { */ acceptFirstMouse?: boolean /** - * Sets whether macOS can automatically organize windows into tabs. + * Defines the window [tabbing identifier](https://developer.apple.com/documentation/appkit/nswindow/1644704-tabbingidentifier) on macOS. + * + * Windows with the same tabbing identifier are grouped together. */ - automaticTabbing?: boolean + tabbingIdentifier?: boolean /** * The user agent for the webview. */ diff --git a/tooling/cli/Cargo.lock b/tooling/cli/Cargo.lock index 69592f7f5ad..0bf34c05a29 100644 --- a/tooling/cli/Cargo.lock +++ b/tooling/cli/Cargo.lock @@ -113,9 +113,9 @@ dependencies = [ [[package]] name = "attohttpc" -version = "0.22.0" +version = "0.23.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1fcf00bc6d5abb29b5f97e3c61a90b6d3caa12f3faf897d4a3e3607c050a35a7" +checksum = "12489f6c5525b06c7e5d689f0efeeae5b9efc38824478e854da9f4f33f040cf5" dependencies = [ "flate2", "http", diff --git a/tooling/cli/schema.json b/tooling/cli/schema.json index 1d45dcdd5fb..090f8cdaa66 100644 --- a/tooling/cli/schema.json +++ b/tooling/cli/schema.json @@ -676,10 +676,12 @@ "default": false, "type": "boolean" }, - "automaticTabbing": { - "description": "Sets whether macOS can automatically organize windows into tabs.", - "default": true, - "type": "boolean" + "tabbingIdentifier": { + "description": "Defines the window [tabbing identifier].\n\n[tabbing identifier]: ", + "type": [ + "string", + "null" + ] } }, "additionalProperties": false @@ -2735,4 +2737,4 @@ "additionalProperties": true } } -} +} \ No newline at end of file From 1463f8ceea2afb58232b141303ce261b0f9afda6 Mon Sep 17 00:00:00 2001 From: Lucas Nogueira Date: Tue, 18 Oct 2022 10:38:04 -0300 Subject: [PATCH 5/6] lint --- examples/multiwindow/main.rs | 1 + 1 file changed, 1 insertion(+) diff --git a/examples/multiwindow/main.rs b/examples/multiwindow/main.rs index e6a7172a10f..ae3a09ac5e9 100644 --- a/examples/multiwindow/main.rs +++ b/examples/multiwindow/main.rs @@ -18,6 +18,7 @@ fn main() { }); }) .setup(|app| { + #[allow(unused_mut)] let mut builder = WindowBuilder::new( app, "Rust".to_string(), From 5f8e413af64d3081ea6ebcb0b96802a8f6b4da57 Mon Sep 17 00:00:00 2001 From: Caesar Schinas Date: Tue, 18 Oct 2022 21:20:08 +0100 Subject: [PATCH 6/6] docs: add notes to tabbing_identifier --- core/tauri-runtime/src/webview.rs | 5 ++++- core/tauri-utils/src/config.rs | 5 ++++- core/tauri/src/window.rs | 5 ++++- tooling/api/src/window.ts | 5 +++-- 4 files changed, 15 insertions(+), 5 deletions(-) diff --git a/core/tauri-runtime/src/webview.rs b/core/tauri-runtime/src/webview.rs index 87c03dd3770..8b6a0a6940c 100644 --- a/core/tauri-runtime/src/webview.rs +++ b/core/tauri-runtime/src/webview.rs @@ -219,7 +219,10 @@ pub trait WindowBuilder: WindowBuilderBase { #[must_use] fn hidden_title(self, hidden: bool) -> Self; - /// Defines the window [tabbing identifier]. + /// Defines the window [tabbing identifier] for macOS. + /// + /// Windows with matching tabbing identifiers will be grouped together. + /// If the tabbing identifier is not set, automatic tabbing will be disabled. /// /// [tabbing identifier]: #[cfg(target_os = "macos")] diff --git a/core/tauri-utils/src/config.rs b/core/tauri-utils/src/config.rs index 4c33b9aed7e..d559e2cb91e 100644 --- a/core/tauri-utils/src/config.rs +++ b/core/tauri-utils/src/config.rs @@ -873,7 +873,10 @@ pub struct WindowConfig { /// Whether clicking an inactive window also clicks through to the webview. #[serde(default, alias = "accept-first-mouse")] pub accept_first_mouse: bool, - /// Defines the window [tabbing identifier]. + /// Defines the window [tabbing identifier] for macOS. + /// + /// Windows with matching tabbing identifiers will be grouped together. + /// If the tabbing identifier is not set, automatic tabbing will be disabled. /// /// [tabbing identifier]: #[serde(default, alias = "tabbing-identifier")] diff --git a/core/tauri/src/window.rs b/core/tauri/src/window.rs index ea04ba6b983..8480901cb42 100644 --- a/core/tauri/src/window.rs +++ b/core/tauri/src/window.rs @@ -462,7 +462,10 @@ impl<'a, R: Runtime> WindowBuilder<'a, R> { self } - /// Defines the window [tabbing identifier]. + /// Defines the window [tabbing identifier] for macOS. + /// + /// Windows with matching tabbing identifiers will be grouped together. + /// If the tabbing identifier is not set, automatic tabbing will be disabled. /// /// [tabbing identifier]: #[cfg(target_os = "macos")] diff --git a/tooling/api/src/window.ts b/tooling/api/src/window.ts index 902c9245310..81e3ae870fc 100644 --- a/tooling/api/src/window.ts +++ b/tooling/api/src/window.ts @@ -2049,9 +2049,10 @@ interface WindowOptions { /** * Defines the window [tabbing identifier](https://developer.apple.com/documentation/appkit/nswindow/1644704-tabbingidentifier) on macOS. * - * Windows with the same tabbing identifier are grouped together. + * Windows with the same tabbing identifier will be grouped together. + * If the tabbing identifier is not set, automatic tabbing will be disabled. */ - tabbingIdentifier?: boolean + tabbingIdentifier?: string /** * The user agent for the webview. */