aboutsummaryrefslogtreecommitdiffstats
path: root/src/nativewindow/native
diff options
context:
space:
mode:
Diffstat (limited to 'src/nativewindow/native')
-rw-r--r--src/nativewindow/native/x11/Xmisc.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/nativewindow/native/x11/Xmisc.c b/src/nativewindow/native/x11/Xmisc.c
index d481343f9..8b56bca90 100644
--- a/src/nativewindow/native/x11/Xmisc.c
+++ b/src/nativewindow/native/x11/Xmisc.c
@@ -293,14 +293,16 @@ static void x11IOErrorHandlerEnable(int onoff, JNIEnv * env) {
}
static int _initialized=0;
+static jboolean _xinitThreadsOK=JNI_FALSE;
-JNIEXPORT void JNICALL
+JNIEXPORT jboolean JNICALL
Java_jogamp_nativewindow_x11_X11Util_initialize0(JNIEnv *env, jclass _unused, jboolean firstUIActionOnProcess) {
if(0==_initialized) {
if( JNI_TRUE == firstUIActionOnProcess ) {
if( 0 == XInitThreads() ) {
fprintf(stderr, "Warning: XInitThreads() failed\n");
} else {
+ _xinitThreadsOK=JNI_TRUE;
fprintf(stderr, "Info: XInitThreads() called for concurrent Thread support\n");
}
} else {
@@ -311,6 +313,7 @@ Java_jogamp_nativewindow_x11_X11Util_initialize0(JNIEnv *env, jclass _unused, jb
x11IOErrorHandlerEnable(1, env);
_initialized=1;
}
+ return _xinitThreadsOK;
}
JNIEXPORT void JNICALL