summaryrefslogtreecommitdiffstats
path: root/src/nativewindow/native
diff options
context:
space:
mode:
authorSven Gothel <[email protected]>2012-10-02 07:29:13 +0200
committerSven Gothel <[email protected]>2012-10-02 07:29:13 +0200
commit21b85e647f1e661c8e5e49caa91c564a3d041df2 (patch)
tree0e84e97cc954ad07a0e683b7790ad442d50aeecd /src/nativewindow/native
parent7c333e3e2574879465719ed968112b27255368d4 (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
Diffstat (limited to 'src/nativewindow/native')
-rw-r--r--src/nativewindow/native/x11/Xmisc.c22
1 files changed, 5 insertions, 17 deletions
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