On macOS, set that we prefer tabbing

Winit now supports tabbing identifiers, thus set that we prefer tabbing,
in particular it'll make windows tab when using the same tabbing identifiers,
which is desirable for the end users.
This commit is contained in:
Sam
2023-07-13 21:14:04 -07:00
committed by Kirill Chibisov
parent e2c71a4422
commit 912c45e9f7
3 changed files with 20 additions and 2 deletions

View File

@@ -48,7 +48,7 @@ use super::appkit::{
NSApp, NSAppKitVersion, NSAppearance, NSApplicationPresentationOptions, NSBackingStoreType,
NSColor, NSCursor, NSFilenamesPboardType, NSRequestUserAttentionType, NSResponder, NSScreen,
NSView, NSWindow, NSWindowButton, NSWindowLevel, NSWindowSharingType, NSWindowStyleMask,
NSWindowTitleVisibility,
NSWindowTabbingMode, NSWindowTitleVisibility,
};
#[derive(Debug, Copy, Clone, PartialEq, Eq, PartialOrd, Ord, Hash)]
@@ -362,6 +362,7 @@ impl WinitWindow {
if let Some(identifier) = pl_attrs.tabbing_identifier {
this.setTabbingIdentifier(&NSString::from_str(&identifier));
this.setTabbingMode(NSWindowTabbingMode::NSWindowTabbingModePreferred);
}
if attrs.content_protected {