<!--
{
  "availability" : [
    "macOS: 10.9.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "AppKit",
  "identifier" : "/documentation/AppKit/NSWindow/didChangeOcclusionStateNotification",
  "metadataVersion" : "0.1.0",
  "role" : "Type Property",
  "symbol" : {
    "kind" : "Type Property",
    "modules" : [
      "AppKit"
    ],
    "preciseIdentifier" : "c:@NSWindowDidChangeOcclusionStateNotification"
  },
  "title" : "didChangeOcclusionStateNotification"
}
-->

# didChangeOcclusionStateNotification

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

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

## 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`](/documentation/AppKit/NSWindow/DidChangeOcclusionStateMessage).

---

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)