---
title: "windowManagerRole(_:)"
framework: swiftui
role: symbol
role_heading: Instance Method
path: "swiftui/scene/windowmanagerrole(_:)"
---

# windowManagerRole(_:)

Configures the role for windows derived from self when participating in a managed window context, such as full screen or Stage Manager.

## Declaration

```swift
nonisolated func windowManagerRole(_ role: WindowManagerRole) -> some Scene

```

## Discussion

Discussion By default, the type of Scene and its placement within the app’s definition will determine the behavior of its windows within a window management context. You can use this modifier to override the default behaivor. For example, you can specify that a secondary Window scene should use the principal behavior for full screen and Stage Manager: struct MyApp: App {     var body: some Scene {         WindowGroup {             ContentView()         }         Window("Organizer", id: "organizer") {             OrganizerView()         }         .windowManagerRole(.principal)     } }

## See Also

### Managing window behavior

- [WindowManagerRole](swiftui/windowmanagerrole.md)
- [WindowInteractionBehavior](swiftui/windowinteractionbehavior.md)
- [windowDismissBehavior(_:)](swiftui/view/windowdismissbehavior(_:).md)
- [windowFullScreenBehavior(_:)](swiftui/view/windowfullscreenbehavior(_:).md)
- [windowMinimizeBehavior(_:)](swiftui/view/windowminimizebehavior(_:).md)
- [windowResizeBehavior(_:)](swiftui/view/windowresizebehavior(_:).md)
- [windowBackgroundDragBehavior(_:)](swiftui/scene/windowbackgrounddragbehavior(_:).md)
- [allowsWindowActivationEvents()](swiftui/view/allowswindowactivationevents().md)
- [allowsWindowActivationEvents(_:)](swiftui/view/allowswindowactivationevents(_:).md)
