OSX: add a fix for lion_fs loosing handles after calling fs from key shortcut, also reenabled lion_fs for OSX >= 10.9 again

This commit is contained in:
Jens Verwiebe 2014-08-13 15:27:41 +02:00
parent eca7c96a28
commit 3bbba7d2b1
2 changed files with 10 additions and 11 deletions

@ -736,10 +736,10 @@ bool GHOST_SystemCocoa::processEvents(bool waitForEvent)
handleKeyEvent(event);
}
else {
// For some reason NSApp is swallowing the key up events when command
// For some reason NSApp is swallowing the key up events when modifier
// key is pressed, even if there seems to be no apparent reason to do
// so, as a workaround we always handle these up events.
if ([event type] == NSKeyUp && ([event modifierFlags] & NSCommandKeyMask))
if ([event type] == NSKeyUp && (([event modifierFlags] & NSCommandKeyMask) || [event modifierFlags] & NSAlternateKeyMask))
handleKeyEvent(event);
[NSApp sendEvent:event];

@ -728,15 +728,14 @@ GHOST_WindowCocoa::GHOST_WindowCocoa(
if (state == GHOST_kWindowStateFullScreen)
setState(GHOST_kWindowStateFullScreen);
//Using lion_fullscreen suffers from an uncovered problem when called from operator, disabled for now
// //Starting with 10.9 (darwin 13.x.x), we always use Lion fullscreen, since it
// //now has proper multi-monitor support for fullscreen
// 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') {
// m_lionStyleFullScreen = true;
// }
//Starting with 10.9 (darwin 13.x.x), we always use Lion fullscreen, since it
//now has proper multi-monitor support for fullscreen
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') {
m_lionStyleFullScreen = true;
}
[pool drain];
}