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

# CGShieldingWindowID(_:)

Returns the window ID of the shield window for a captured display.

```
func CGShieldingWindowID(_ display: CGDirectDisplayID) -> CGWindowID
```

## Parameters

`display`

The identifier of the display to be accessed.

## Return Value

The window ID of the shield window for the specified display, or `NULL` if the display is not shielded.

## Discussion

To prevent updates by direct-to-screen programs, Quartz draws a shield window that fills the entire screen of a captured display.

This function is not recommended for use in applications. Note that the graphics context associated with this window is not a full-featured drawing context. To get a full-featured drawing context for a captured display, you should use the function [`CGDisplayGetDrawingContext(_:)`](/documentation/CoreGraphics/CGDisplayGetDrawingContext(_:)).

---

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)