---
title: didChangeOcclusionStateNotification
framework: appkit
role: symbol
role_heading: Type Property
path: appkit/nswindow/didchangeocclusionstatenotification
---

# didChangeOcclusionStateNotification

A notification that the window object’s occlusion state changed.

## Declaration

```swift
class let didChangeOcclusionStateNotification: NSNotification.Name
```

## Discussion

Discussion The notification object is the NSWindow object whose occlusion state changed. This notification doesn’t contain a userInfo dictionary. This notification indicates a change in the window’s occlusion state; it doesn’t indicate a change in the occlusion region. When you receive this notification, you can get the window’s current occlusion state and—based on the result—you may want to increase responsiveness and save power by halting expensive operations that the user can’t see. To observe this notification using Swift concurrency, use NSWindow.DidChangeOcclusionStateMessage.

## See Also

### Notifications

- [didBecomeKeyNotification](appkit/nswindow/didbecomekeynotification.md)
- [didBecomeMainNotification](appkit/nswindow/didbecomemainnotification.md)
- [didChangeScreenNotification](appkit/nswindow/didchangescreennotification.md)
- [didChangeScreenProfileNotification](appkit/nswindow/didchangescreenprofilenotification.md)
- [didDeminiaturizeNotification](appkit/nswindow/diddeminiaturizenotification.md)
- [didEndSheetNotification](appkit/nswindow/didendsheetnotification.md)
- [didEndLiveResizeNotification](appkit/nswindow/didendliveresizenotification.md)
- [didExposeNotification](appkit/nswindow/didexposenotification.md)
- [didMiniaturizeNotification](appkit/nswindow/didminiaturizenotification.md)
- [didMoveNotification](appkit/nswindow/didmovenotification.md)
- [didResignKeyNotification](appkit/nswindow/didresignkeynotification.md)
- [didResignMainNotification](appkit/nswindow/didresignmainnotification.md)
- [didResizeNotification](appkit/nswindow/didresizenotification.md)
- [didUpdateNotification](appkit/nswindow/didupdatenotification.md)
- [willBeginSheetNotification](appkit/nswindow/willbeginsheetnotification.md)
