From af332515f76a4017e7a52ebec920e794a5398db4 Mon Sep 17 00:00:00 2001 From: Sven Gothel Date: Sun, 16 Oct 2011 04:30:36 +0200 Subject: NEWT/OSX: exec. makeKeyAndOrderFront/makeKeyWindow on MainThread --- src/newt/native/MacWindow.m | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) (limited to 'src/newt/native') 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); -- cgit v1.2.3