[Bf-blender-cvs] [0ddae97] blender-v2.72-release: OSX: refinement for last fullscreen condition commit

Jens Verwiebe noreply at git.blender.org
Wed Oct 15 13:54:19 CEST 2014


Commit: 0ddae97e9d582698c5010eb618f4ff42db50f7d8
Author: Jens Verwiebe
Date:   Tue Oct 14 13:17:14 2014 +0200
Branches: blender-v2.72-release
https://developer.blender.org/rB0ddae97e9d582698c5010eb618f4ff42db50f7d8

OSX: refinement for last fullscreen condition commit

===================================================================

M	intern/ghost/intern/GHOST_WindowCocoa.mm

===================================================================

diff --git a/intern/ghost/intern/GHOST_WindowCocoa.mm b/intern/ghost/intern/GHOST_WindowCocoa.mm
index 328bb37..a7a3470 100644
--- a/intern/ghost/intern/GHOST_WindowCocoa.mm
+++ b/intern/ghost/intern/GHOST_WindowCocoa.mm
@@ -728,17 +728,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];
 }




More information about the Bf-blender-cvs mailing list