OSX: refinement for last fullscreen condition commit

This commit is contained in:
jens verwiebe 2014-10-14 13:17:14 +02:00
parent 424c050a6f
commit e0cacb808c
1 changed files with 6 additions and 8 deletions

View File

@ -634,17 +634,15 @@ GHOST_WindowCocoa::GHOST_WindowCocoa(
if (state == GHOST_kWindowStateFullScreen)
setState(GHOST_kWindowStateFullScreen);
// Starting with 10.9 (darwin 13.x.x), we always use Lion fullscreen, since it
// now has better multi-monitor support for fullscreen
// Starting with 10.9 (darwin 13.x.x), we can use Lion fullscreen,
// since it now has better multi-monitor support
// if the screens are spawned, additional screens get useless,
// so we only use lionStyleFullScreen when screens have separate spaces
char darwin_ver[10];
size_t len = sizeof(darwin_ver);
sysctlbyname("kern.osrelease", &darwin_ver, &len, NULL, 0);
if(darwin_ver[0] == '1' && darwin_ver[1] >= '3' && [NSScreen screensHaveSeparateSpaces]) {
m_lionStyleFullScreen = true;
}
if ([NSScreen respondsToSelector:@selector(screensHaveSeparateSpaces)] && [NSScreen screensHaveSeparateSpaces]) {
// implies we are on >= OSX 10.9
m_lionStyleFullScreen = true;
}
[pool drain];
}