mirror of
https://github.com/glfw/glfw.git
synced 2024-11-29 15:44:35 +00:00
Guard Cocoa system appearance observation in ifdefs for MacOS 10.14+
NSAppearanceName constants have various OS constraints, and so require more thorough checks.
This commit is contained in:
parent
b091cc0c80
commit
5ee6c4526d
@ -448,6 +448,7 @@ static GLFWbool initializeTIS(void)
|
||||
_glfwInputSystemTheme(NULL);
|
||||
}*/
|
||||
|
||||
#if MAC_OS_X_VERSION_MAX_ALLOWED >= 101400
|
||||
- (void)observeValueForKeyPath:(NSString *)keyPath
|
||||
ofObject:(id)object
|
||||
change:(NSDictionary *)change
|
||||
@ -472,6 +473,7 @@ static GLFWbool initializeTIS(void)
|
||||
[self accentColorChanged];
|
||||
}*/
|
||||
}
|
||||
#endif
|
||||
|
||||
@end // GLFWHelper
|
||||
|
||||
@ -734,10 +736,12 @@ int _glfwInitCocoa(void)
|
||||
context:nil];
|
||||
*/
|
||||
|
||||
#if MAC_OS_X_VERSION_MAX_ALLOWED >= 101400
|
||||
[NSApp addObserver:_glfw.ns.helper
|
||||
forKeyPath:@"effectiveAppearance"
|
||||
options:0
|
||||
context:nil];
|
||||
#endif
|
||||
|
||||
if (![[NSRunningApplication currentApplication] isFinishedLaunching])
|
||||
[NSApp run];
|
||||
|
Loading…
Reference in New Issue
Block a user