<!--
{
  "availability" : [
    "macOS: -"
  ],
  "documentType" : "symbol",
  "framework" : "AppKit",
  "identifier" : "/documentation/AppKit/NSWindow/isMainWindow",
  "metadataVersion" : "0.1.0",
  "role" : "Instance Property",
  "symbol" : {
    "kind" : "Instance Property",
    "modules" : [
      "AppKit"
    ],
    "preciseIdentifier" : "c:objc(cs)NSWindow(py)mainWindow"
  },
  "title" : "isMainWindow"
}
-->

# isMainWindow

A Boolean value that indicates whether the window is the application’s main window.

```
var isMainWindow: Bool { get }
```

## Discussion

The value of this property is <doc://com.apple.documentation/documentation/Swift/true> when the window is the main window for the application; otherwise, <doc://com.apple.documentation/documentation/Swift/false>.

## See Also

[`isKeyWindow`](/documentation/AppKit/NSWindow/isKeyWindow)

A Boolean value that indicates whether the window is the key window for the application.



---

Copyright &copy; 2026 Apple Inc. All rights reserved. | [Terms of Use](https://www.apple.com/legal/internet-services/terms/site.html) | [Privacy Policy](https://www.apple.com/privacy/privacy-policy)