mirror of
https://github.com/glfw/glfw.git
synced 2024-11-22 18:15:10 +00:00
Cocoa: Fix compilation error on OS X 10.8
The occlusion state parts of NSWindow are OS X 10.9+ only but we still
(technically) support building for only 10.8.
Fixes #2161
(cherry picked from commit 5e4496cb42
)
This commit is contained in:
parent
80d45cdfd7
commit
63bba49e31
@ -128,6 +128,8 @@ information on what to include when reporting a bug.
|
|||||||
- [Win32] Fix pkg-config for dynamic library on Windows (#2386, #2420)
|
- [Win32] Fix pkg-config for dynamic library on Windows (#2386, #2420)
|
||||||
- [Win32] Bugfix: `glfwWaitEventsTimeout` did not return for some sent messages (#2408)
|
- [Win32] Bugfix: `glfwWaitEventsTimeout` did not return for some sent messages (#2408)
|
||||||
- [Win32] Bugfix: XInput could reportedly provide invalid DPad bit masks (#2291)
|
- [Win32] Bugfix: XInput could reportedly provide invalid DPad bit masks (#2291)
|
||||||
|
- [Cocoa] Bugfix: Compilation failed on OS X 10.8 due to unconditional use of 10.9+
|
||||||
|
symbols (#2161)
|
||||||
- [Wayland] Added improved fallback window decorations via libdecor (#1639,#1693)
|
- [Wayland] Added improved fallback window decorations via libdecor (#1639,#1693)
|
||||||
- [Wayland] Bugfix: Connecting a mouse after `glfwInit` would segfault (#1450)
|
- [Wayland] Bugfix: Connecting a mouse after `glfwInit` would segfault (#1450)
|
||||||
- [Wayland] Disabled alpha channel for opaque windows on systems lacking
|
- [Wayland] Disabled alpha channel for opaque windows on systems lacking
|
||||||
|
@ -308,12 +308,17 @@ static const NSRange kEmptyRange = { NSNotFound, 0 };
|
|||||||
}
|
}
|
||||||
|
|
||||||
- (void)windowDidChangeOcclusionState:(NSNotification* )notification
|
- (void)windowDidChangeOcclusionState:(NSNotification* )notification
|
||||||
|
{
|
||||||
|
#if MAC_OS_X_VERSION_MAX_ALLOWED >= 1090
|
||||||
|
if ([window->ns.object respondsToSelector:@selector(occlusionState)])
|
||||||
{
|
{
|
||||||
if ([window->ns.object occlusionState] & NSWindowOcclusionStateVisible)
|
if ([window->ns.object occlusionState] & NSWindowOcclusionStateVisible)
|
||||||
window->ns.occluded = GLFW_FALSE;
|
window->ns.occluded = GLFW_FALSE;
|
||||||
else
|
else
|
||||||
window->ns.occluded = GLFW_TRUE;
|
window->ns.occluded = GLFW_TRUE;
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
|
}
|
||||||
|
|
||||||
@end
|
@end
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user