Skip to content

Commit 0933af0

Browse files
authored
fix: Correcting errors in window CGWindowListOption values (#653)
1 parent d4ce710 commit 0933af0

File tree

1 file changed

+7
-6
lines changed

1 file changed

+7
-6
lines changed

core-graphics/src/window.rs

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -31,13 +31,14 @@ pub const kCGWindowBackingStoreRetained: CGWindowBackingType = 0;
3131
pub const kCGWindowBackingStoreNonretained: CGWindowBackingType = 1;
3232
pub const kCGWindowBackingStoreBuffered: CGWindowBackingType = 2;
3333

34+
// https://developer.apple.com/documentation/coregraphics/quartz_window_services/window_list_option_constants?language=objc
3435
pub type CGWindowListOption = u32;
35-
pub const kCGWindowListOptionAll: CGWindowListOption = 1 << 0;
36-
pub const kCGWindowListOptionOnScreenOnly: CGWindowListOption = 1 << 1;
37-
pub const kCGWindowListOptionOnScreenAboveWindow: CGWindowListOption = 1 << 2;
38-
pub const kCGWindowListOptionOnScreenBelowWindow: CGWindowListOption = 1 << 3;
39-
pub const kCGWindowListOptionIncludingWindow: CGWindowListOption = 1 << 4;
40-
pub const kCGWindowListOptionExcludeDesktopElements: CGWindowListOption = 1 << 5;
36+
pub const kCGWindowListOptionAll: CGWindowListOption = 0;
37+
pub const kCGWindowListOptionOnScreenOnly: CGWindowListOption = 1 << 0;
38+
pub const kCGWindowListOptionOnScreenAboveWindow: CGWindowListOption = 1 << 1;
39+
pub const kCGWindowListOptionOnScreenBelowWindow: CGWindowListOption = 1 << 2;
40+
pub const kCGWindowListOptionIncludingWindow: CGWindowListOption = 1 << 3;
41+
pub const kCGWindowListExcludeDesktopElements: CGWindowListOption = 1 << 4;
4142

4243
pub type CGWindowImageOption = u32;
4344
pub const kCGWindowImageDefault: CGWindowImageOption = 0;

0 commit comments

Comments
 (0)