diff options
author | Sven Gothel <[email protected]> | 2012-10-02 07:29:13 +0200 |
---|---|---|
committer | Sven Gothel <[email protected]> | 2012-10-02 07:29:13 +0200 |
commit | 21b85e647f1e661c8e5e49caa91c564a3d041df2 (patch) | |
tree | 0e84e97cc954ad07a0e683b7790ad442d50aeecd | |
parent | 7c333e3e2574879465719ed968112b27255368d4 (diff) |
Fix commit fbe331f013608eb31ff0d8675f4e4c9881c9c48b (Bug 616 - Remove XInitThreads())
X11Util/Native: Fix X11Util_initialize0() arguments were wrong and code still invoked XInitThreads() .. woops;
Added missing included "jogamp_nativewindow_x11_X11Util.h" incl. it's generation via javah,
which was the culprit of not detecting it at compile time.
This is a fix for commit fbe331f013608eb31ff0d8675f4e4c9881c9c48b
-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 |