---
title: "windowDidChangeOcclusionState(_:)"
framework: appkit
role: symbol
role_heading: Instance Method
path: "appkit/nswindowdelegate/windowdidchangeocclusionstate(_:)"
---

# windowDidChangeOcclusionState(_:)

Tells the delegate that the window changed its occlusion state.

## Declaration

```swift
@MainActor optional func windowDidChangeOcclusionState(_ notification: Notification)
```

## Parameters

- `notification`: An doc://com.apple.appkit/documentation/AppKit/NSWindow/didChangeOcclusionStateNotification notification.
