---
title: "invalidateCursorRects(for:)"
framework: appkit
role: symbol
role_heading: Instance Method
path: "appkit/nswindow/invalidatecursorrects(for:)"
---

# invalidateCursorRects(for:)

Marks as invalid the cursor rectangles of a given view object in the window, so they’ll be set up again when the window becomes key.

## Declaration

```swift
func invalidateCursorRects(for view: NSView)
```

## Parameters

- `view`: The view in the window’s view hierarchy.

## Discussion

Discussion If the window is current the key window, window resets the cursor rectangles immediately.

## See Also

### Related Documentation

- [resetCursorRects()](appkit/nsview/resetcursorrects().md)

### Managing Cursor Rectangles

- [areCursorRectsEnabled](appkit/nswindow/arecursorrectsenabled.md)
- [enableCursorRects()](appkit/nswindow/enablecursorrects().md)
- [disableCursorRects()](appkit/nswindow/disablecursorrects().md)
- [discardCursorRects()](appkit/nswindow/discardcursorrects().md)
- [resetCursorRects()](appkit/nswindow/resetcursorrects().md)
