<!--
{
  "availability" : [
    "macOS: -"
  ],
  "documentType" : "symbol",
  "framework" : "AppKit",
  "identifier" : "/documentation/AppKit/NSWindow/resetCursorRects()",
  "metadataVersion" : "0.1.0",
  "role" : "Instance Method",
  "symbol" : {
    "kind" : "Instance Method",
    "modules" : [
      "AppKit"
    ],
    "preciseIdentifier" : "c:objc(cs)NSWindow(im)resetCursorRects"
  },
  "title" : "resetCursorRects()"
}
-->

# resetCursorRects()

Clears the window’s cursor rectangles and the cursor rectangles of the [`NSView`](/documentation/AppKit/NSView) objects in its view hierarchy.

```
func resetCursorRects()
```

## Discussion

Invokes [`discardCursorRects()`](/documentation/AppKit/NSWindow/discardCursorRects()) to clear the window’s cursor rectangles, then sends [`resetCursorRects()`](/documentation/AppKit/NSWindow/resetCursorRects()) to every `NSView` object in the window’s view hierarchy.

This method is typically invoked by the NSApplication object when it detects that the key window’s cursor rectangles are invalid. In program code, it’s more efficient to invoke [`invalidateCursorRects(for:)`](/documentation/AppKit/NSWindow/invalidateCursorRects(for:)).

---

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)