Contents

WindowManagerRole

Options for defining how a scene’s windows behave when used within a managed window context, such as full screen mode and Stage Manager.

Declaration

struct WindowManagerRole

Overview

Use values of this type in conjunction with the windowManagerRole(_:) modifier to override the default system behavior.

For example, you can specify that a secondary Window scene should use the principal role for full screen and Stage Manager:

struct MyApp: App {
    var body: some Scene {
        WindowGroup {
            ContentView()
        }
        Window("Organizer", id: "organizer") {
            OrganizerView()
        }
        .windowManagerRole(.principal)
    }
}

Topics

Type Properties

See Also

Managing window behavior