---
title: worksWhenModal
framework: appkit
role: symbol
role_heading: Instance Property
path: appkit/nswindow/workswhenmodal
---

# worksWhenModal

A Boolean value that indicates whether the window is able to receive keyboard and mouse events even when some other window is being run modally.

## Declaration

```swift
var worksWhenModal: Bool { get }
```

## Discussion

Discussion The value of this property is true if the window is able to receive keyboard and mouse events even when some other window is being run modally; otherwise, false. By default, the NSWindow value of this property is false. Only subclasses of NSPanel should override this default.

## See Also

### Related Documentation

- [worksWhenModal](appkit/nspanel/workswhenmodal.md)

### Configuring the Window’s Appearance

- [styleMask](appkit/nswindow/stylemask-swift.property.md)
- [NSWindow.StyleMask](appkit/nswindow/stylemask-swift.struct.md)
- [toggleFullScreen(_:)](appkit/nswindow/togglefullscreen(_:).md)
- [alphaValue](appkit/nswindow/alphavalue.md)
- [backgroundColor](appkit/nswindow/backgroundcolor.md)
- [colorSpace](appkit/nswindow/colorspace.md)
- [setDynamicDepthLimit(_:)](appkit/nswindow/setdynamicdepthlimit(_:).md)
- [canHide](appkit/nswindow/canhide.md)
- [isOnActiveSpace](appkit/nswindow/isonactivespace.md)
- [hidesOnDeactivate](appkit/nswindow/hidesondeactivate.md)
- [collectionBehavior](appkit/nswindow/collectionbehavior-swift.property.md)
- [isOpaque](appkit/nswindow/isopaque.md)
- [hasShadow](appkit/nswindow/hasshadow.md)
- [invalidateShadow()](appkit/nswindow/invalidateshadow().md)
- [autorecalculatesContentBorderThickness(for:)](appkit/nswindow/autorecalculatescontentborderthickness(for:).md)
