Explorar el Código

Updates Max OS X Window Handling to be better

FullScreen
- Window is higher then the 'main menu'
- Alt tab disables application

Window Mode
- Window  is at the 'normal' level and other windows can go over it

Append small fix to author
Author Name hace 13 años
padre
commit
ab38731d2b
Se han modificado 1 ficheros con 6 adiciones y 1 borrados
  1. 6 1
      gameplay/src/PlatformMacOSX.mm

+ 6 - 1
gameplay/src/PlatformMacOSX.mm

@@ -153,9 +153,14 @@ static CVReturn MyDisplayLinkCallback(CVDisplayLinkRef displayLink, const CVTime
     _game->run();
     
     if (__fullscreen)
+    {
         [[self window] setLevel: NSMainMenuWindowLevel+1];
+        [[self window] setHidesOnDeactivate:YES]; 
+    }
     else
-        [[self window] setLevel: NSFloatingWindowLevel];
+    {
+        [[self window] setLevel: NSNormalWindowLevel];
+    }
     [[self window] makeKeyAndOrderFront: self];
     [[self window] setTitle: [NSString stringWithUTF8String: __title ? __title : ""]];