<!--
{
  "availability" : [
    "macCatalyst: 13.1.0 -",
    "macOS: 10.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "CoreGraphics",
  "identifier" : "/documentation/CoreGraphics/CGDisplayHideCursor(_:)",
  "metadataVersion" : "0.1.0",
  "role" : "Function",
  "symbol" : {
    "kind" : "Function",
    "modules" : [
      "Core Graphics"
    ],
    "preciseIdentifier" : "c:@F@CGDisplayHideCursor"
  },
  "title" : "CGDisplayHideCursor(_:)"
}
-->

# CGDisplayHideCursor(_:)

Hides the mouse cursor, and increments the hide cursor count.

```
func CGDisplayHideCursor(_ display: CGDirectDisplayID) -> CGError
```

## Parameters

`display`

This parameter has no effect. By default, you can pass `kCGDirectMainDisplay`.

## Return Value

A result code. To interpret the result code, see [`CGError`](/documentation/CoreGraphics/CGError).

## Discussion

This function hides the cursor regardless of its current location. The `display` parameter has no effect. In most cases, the caller must be the foreground application to affect the cursor.

---

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)