summaryrefslogtreecommitdiffstats
path: root/src/nativewindow/native/x11/Xmisc.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/nativewindow/native/x11/Xmisc.c')
-rw-r--r--src/nativewindow/native/x11/Xmisc.c13
1 files changed, 11 insertions, 2 deletions
diff --git a/src/nativewindow/native/x11/Xmisc.c b/src/nativewindow/native/x11/Xmisc.c
index b8a5004c4..23ff5f854 100644
--- a/src/nativewindow/native/x11/Xmisc.c
+++ b/src/nativewindow/native/x11/Xmisc.c
@@ -247,8 +247,18 @@ static void x11IOErrorHandlerEnable(int onoff, JNIEnv * env) {
static int _initialized=0;
JNIEXPORT void JNICALL
-Java_com_jogamp_nativewindow_impl_x11_X11Util_initialize(JNIEnv *env, jclass _unused) {
+Java_com_jogamp_nativewindow_impl_x11_X11Util_initialize(JNIEnv *env, jclass _unused, jboolean initConcurrentThreadSupport) {
if(0==_initialized) {
+ if( JNI_TRUE == initConcurrentThreadSupport ) {
+ if( 0 == XInitThreads() ) {
+ fprintf(stderr, "Warning: XInitThreads() failed\n");
+ } else {
+ fprintf(stderr, "Info: XInitThreads() called for concurrent Thread support\n");
+ }
+ } else {
+ fprintf(stderr, "Info: XInitThreads() _not_ called for concurrent Thread support\n");
+ }
+
_initClazzAccess(env);
x11ErrorHandlerEnable(1, env);
x11IOErrorHandlerEnable(1, env);
@@ -350,7 +360,6 @@ Java_com_jogamp_nativewindow_impl_x11_X11Lib_XUnlockDisplay__J(JNIEnv *env, jcla
XUnlockDisplay((Display *) (intptr_t) display);
}
-
/* Java->C glue code:
* Java package: com.jogamp.nativewindow.impl.x11.X11Lib
* Java method: int XCloseDisplay(long display)