Index: /trunk/src/VBox/Devices/Graphics/DevVGA-SVGA3d-cocoa.h
===================================================================
--- /trunk/src/VBox/Devices/Graphics/DevVGA-SVGA3d-cocoa.h	(revision 54166)
+++ /trunk/src/VBox/Devices/Graphics/DevVGA-SVGA3d-cocoa.h	(revision 54167)
@@ -18,5 +18,5 @@
 #define __DevVGA_SVGA3d_cocoa_h
 
-#include <iprt/cdefs.h>
+#include <iprt/types.h>
 #include <VBox/VBoxCocoa.h>
 #include <OpenGL/OpenGL.h>
Index: /trunk/src/VBox/Devices/Graphics/DevVGA-SVGA3d-cocoa.m
===================================================================
--- /trunk/src/VBox/Devices/Graphics/DevVGA-SVGA3d-cocoa.m	(revision 54166)
+++ /trunk/src/VBox/Devices/Graphics/DevVGA-SVGA3d-cocoa.m	(revision 54167)
@@ -1,2 +1,3 @@
+/* $Id$ */
 /** @file
  * VirtualBox OpenGL Cocoa Window System Helper Implementation.
@@ -22,4 +23,5 @@
 
 #include <iprt/thread.h>
+#include <iprt/assert.h>
 
 /* Debug macros */
@@ -629,12 +631,11 @@
     NSAutoreleasePool *pPool = [[NSAutoreleasePool alloc] init];
 
-#if 1
-    // @todo galitsyn: NSOpenGLPFAWindow was deprecated starting from OSX 10.9.
     // Consider to remove it and check if it's harmless.
     NSOpenGLPixelFormatAttribute attribs[] =
     {
-        NSOpenGLPFAWindow,
+        NSOpenGLPFAOpenGLProfile, (NSOpenGLPixelFormatAttribute)0,
+        //NSOpenGLPFAWindow, - obsolete/deprecated, try work without it...
+        NSOpenGLPFAAccelerated,
         NSOpenGLPFADoubleBuffer,
-        NSOpenGLPFAAccelerated,
         NSOpenGLPFAColorSize, (NSOpenGLPixelFormatAttribute)24,
         NSOpenGLPFAAlphaSize, (NSOpenGLPixelFormatAttribute)8,
@@ -642,23 +643,17 @@
         0
     };
-#else
-    NSOpenGLPixelFormatAttribute attribs[] =
-    {
-        NSOpenGLPFADoubleBuffer,
-        NSOpenGLPFAAccelerated,
-        NSOpenGLPFAColorSize, (NSOpenGLPixelFormatAttribute)24,
-        NSOpenGLPFADepthSize, 24,
-        NSOpenGLPFAOpenGLProfile, NSOpenGLProfileVersion3_2Core,
-        0
-    };
-#endif
+    attribs[1] = fOtherProfile ? NSOpenGLProfileVersion3_2Core : NSOpenGLProfileVersionLegacy;
 
     /* Choose a pixel format */
     pFmt = [[NSOpenGLPixelFormat alloc] initWithAttributes:attribs];
-
     if (pFmt)
     {
         *ppCtx = [[VMSVGA3DOpenGLContext alloc] initWithFormat:pFmt shareContext:pShareCtx];
         DEBUG_MSG(("New context %p\n", (void *)*ppCtx));
+    }
+    else
+    {
+        AssertFailed();
+        *ppCtx = NULL;
     }
 
@@ -765,2 +760,3 @@
     DEBUG_FUNC_LEAVE();
 }
+
