aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSven Gothel <[email protected]>2011-10-16 04:30:36 +0200
committerSven Gothel <[email protected]>2011-10-16 04:30:36 +0200
commitaf332515f76a4017e7a52ebec920e794a5398db4 (patch)
tree4394cb78e39a718618646c8d14aa62d9a08f229e
parent5b30ac3297601dec581d58835ef6bddaef079c77 (diff)
NEWT/OSX: exec. makeKeyAndOrderFront/makeKeyWindow on MainThread
-rw-r--r--src/newt/native/MacWindow.m11
1 files changed, 6 insertions, 5 deletions
diff --git a/src/newt/native/MacWindow.m b/src/newt/native/MacWindow.m
index 1ddf3363f..fa555d119 100644
--- a/src/newt/native/MacWindow.m
+++ b/src/newt/native/MacWindow.m
@@ -336,7 +336,8 @@ JNIEXPORT jlong JNICALL Java_jogamp_newt_driver_macosx_MacWindow_createWindow0
// Immediately re-position the window based on an upper-left coordinate system
setFrameTopLeftPoint(parentWindow, myWindow, x, y);
- [myWindow makeKeyAndOrderFront: myWindow];
+ // [myWindow makeKeyAndOrderFront: myWindow];
+ [myWindow performSelectorOnMainThread:@selector(makeKeyAndOrderFront:) withObject:myWindow waitUntilDone:YES];
NS_DURING
// Available >= 10.5 - Makes the menubar disapear
@@ -371,8 +372,8 @@ JNIEXPORT void JNICALL Java_jogamp_newt_driver_macosx_MacWindow_makeKeyAndOrderF
DBG_PRINT( "makeKeyAndOrderFront0 - window: %p (START)\n", win);
- // [win performSelectorOnMainThread:@selector(makeKeyAndOrderFront:) withObject:win waitUntilDone:YES];
- [win makeKeyAndOrderFront: win];
+ [win performSelectorOnMainThread:@selector(makeKeyAndOrderFront:) withObject:win waitUntilDone:YES];
+ // [win makeKeyAndOrderFront: win];
DBG_PRINT( "makeKeyAndOrderFront0 - window: %p (END)\n", win);
@@ -392,8 +393,8 @@ JNIEXPORT void JNICALL Java_jogamp_newt_driver_macosx_MacWindow_makeKey0
DBG_PRINT( "makeKey0 - window: %p (START)\n", win);
- // [win performSelectorOnMainThread:@selector(makeKeyWindow:) withObject:nil waitUntilDone:YES];
- [win makeKeyWindow];
+ [win performSelectorOnMainThread:@selector(makeKeyWindow:) withObject:nil waitUntilDone:YES];
+ // [win makeKeyWindow];
DBG_PRINT( "makeKey0 - window: %p (END)\n", win);