<!--
{
  "availability" : [
    "macOS: -"
  ],
  "documentType" : "symbol",
  "framework" : "AppKit",
  "identifier" : "/documentation/AppKit/NSWindow/invalidateCursorRects(for:)",
  "metadataVersion" : "0.1.0",
  "role" : "Instance Method",
  "symbol" : {
    "kind" : "Instance Method",
    "modules" : [
      "AppKit"
    ],
    "preciseIdentifier" : "c:objc(cs)NSWindow(im)invalidateCursorRectsForView:"
  },
  "title" : "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.

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

## Parameters

`view`

The view in the window’s view hierarchy.

## Discussion

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

## See Also

[`-  resetCursorRects`](/documentation/AppKit/NSView/resetCursorRects())

Overridden by subclasses to define their default cursor rectangles.



---

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)