diff options
-rw-r--r-- | make/build-nativewindow.xml | 1 | ||||
-rw-r--r-- | src/nativewindow/native/x11/Xmisc.c | 22 |
2 files changed, 6 insertions, 17 deletions
diff --git a/make/build-nativewindow.xml b/make/build-nativewindow.xml index 6a9dbdc2e..3c97d9d9b 100644 --- a/make/build-nativewindow.xml +++ b/make/build-nativewindow.xml @@ -759,6 +759,7 @@ <target name="c.build.nativewindow.windowlib.x11" if="isX11"> <javah destdir="${src.generated.c}/X11" classpath="${javah.classpath}" class="jogamp.nativewindow.x11.X11Lib" /> + <javah destdir="${src.generated.c}/X11" classpath="${javah.classpath}" class="jogamp.nativewindow.x11.X11Util" /> <c.build c.compiler.src.files="c.src.files.x11" output.lib.name="nativewindow_x11" diff --git a/src/nativewindow/native/x11/Xmisc.c b/src/nativewindow/native/x11/Xmisc.c index 8bfe28f2b..129baac62 100644 --- a/src/nativewindow/native/x11/Xmisc.c +++ b/src/nativewindow/native/x11/Xmisc.c @@ -29,6 +29,7 @@ #include "NativewindowCommon.h" #include "Xmisc.h" #include "jogamp_nativewindow_x11_X11Lib.h" +#include "jogamp_nativewindow_x11_X11Util.h" // #define VERBOSE_ON 1 @@ -279,28 +280,15 @@ static void x11IOErrorHandlerEnable(int onoff, JNIEnv * env) { } } -static int _initialized=0; -static jboolean _xinitThreadsOK=JNI_FALSE; +static int _initialized = 0; JNIEXPORT jboolean JNICALL -Java_jogamp_nativewindow_x11_X11Util_initialize0(JNIEnv *env, jclass clazz, jboolean firstUIActionOnProcess, jboolean debug) { - if(0==_initialized) { +Java_jogamp_nativewindow_x11_X11Util_initialize0(JNIEnv *env, jclass clazz, jboolean debug) { + if( 0 == _initialized ) { if(debug) { errorHandlerDebug = 1; } X11UtilClazz = (jclass)(*env)->NewGlobalRef(env, clazz); - if( JNI_TRUE == firstUIActionOnProcess ) { - if( 0 == XInitThreads() ) { - fprintf(stderr, "Warning: XInitThreads() failed\n"); - } else { - _xinitThreadsOK=JNI_TRUE; - if(debug) { - fprintf(stderr, "X11: XInitThreads() called for concurrent Thread support\n"); - } - } - } else if(debug) { - fprintf(stderr, "X11: XInitThreads() _not_ called for concurrent Thread support\n"); - } _initClazzAccess(env); x11IOErrorHandlerEnable(1, env); @@ -310,7 +298,7 @@ Java_jogamp_nativewindow_x11_X11Util_initialize0(JNIEnv *env, jclass clazz, jboo fprintf(stderr, "Info: NativeWindow native init passed\n"); } } - return _xinitThreadsOK; + return JNI_TRUE; } JNIEXPORT void JNICALL |