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

# windowDidFailToExitFullScreen(_:)

Called if the window failed to exit full-screen mode.

## Declaration

```swift
@MainActor optional func windowDidFailToExitFullScreen(_ window: NSWindow)
```

## Parameters

- `window`: The window that failed to exit to full-screen mode.

## Discussion

Discussion In some cases, the transition to exit full-screen mode can fail, due to being in the midst of handling some other animation or user gesture. This method indicates that there was an error, and you should clean up any work you may have done to prepare to exit full-screen mode. This message is sent whether or not the delegate indicated a custom animation by returning non-nil from  customWindowsToExitFullScreen(for:).

## See Also

### Custom Full-Screen Presentation Animations

- [customWindowsToEnterFullScreen(for:)](appkit/nswindowdelegate/customwindowstoenterfullscreen(for:).md)
- [customWindowsToEnterFullScreen(for:on:)](appkit/nswindowdelegate/customwindowstoenterfullscreen(for:on:).md)
- [window(_:startCustomAnimationToEnterFullScreenWithDuration:)](appkit/nswindowdelegate/window(_:startcustomanimationtoenterfullscreenwithduration:).md)
- [window(_:startCustomAnimationToEnterFullScreenOn:withDuration:)](appkit/nswindowdelegate/window(_:startcustomanimationtoenterfullscreenon:withduration:).md)
- [windowDidFailToEnterFullScreen(_:)](appkit/nswindowdelegate/windowdidfailtoenterfullscreen(_:).md)
- [customWindowsToExitFullScreen(for:)](appkit/nswindowdelegate/customwindowstoexitfullscreen(for:).md)
- [window(_:startCustomAnimationToExitFullScreenWithDuration:)](appkit/nswindowdelegate/window(_:startcustomanimationtoexitfullscreenwithduration:).md)
