---
title: optionOnScreenOnly
framework: coregraphics
role: symbol
role_heading: Type Property
path: coregraphics/cgwindowlistoption/optiononscreenonly
---

# optionOnScreenOnly

## Declaration

```swift
static var optionOnScreenOnly: CGWindowListOption { get }
```

## Discussion

Discussion List all windows that are currently onscreen. Windows are returned in order from front to back. When retrieving a list with this option, the relativeToWindow parameter should be set to kCGNullWindowID.

## See Also

### Type Properties

- [excludeDesktopElements](coregraphics/cgwindowlistoption/excludedesktopelements.md)
- [optionAll](coregraphics/cgwindowlistoption/optionall.md)
- [optionIncludingWindow](coregraphics/cgwindowlistoption/optionincludingwindow.md)
- [optionOnScreenAboveWindow](coregraphics/cgwindowlistoption/optiononscreenabovewindow.md)
- [optionOnScreenBelowWindow](coregraphics/cgwindowlistoption/optiononscreenbelowwindow.md)
