diff options
author | Sven Gothel <[email protected]> | 2011-08-31 15:46:29 +0200 |
---|---|---|
committer | Sven Gothel <[email protected]> | 2011-08-31 15:46:29 +0200 |
commit | a7340fd941b26d633c438cb5adb22f2c30a5cff0 (patch) | |
tree | 17d05f4bfc2b23ecd39d02b02b2df30b41987e8e /src/nativewindow/native/x11/Xmisc.c | |
parent | 07bc291382eb76c4dd06a82f78ab3b121cfd9f81 (diff) |
NativeWindow X11 Error Handler: Even if quiet, print message on stderr.
Diffstat (limited to 'src/nativewindow/native/x11/Xmisc.c')
-rw-r--r-- | src/nativewindow/native/x11/Xmisc.c | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/src/nativewindow/native/x11/Xmisc.c b/src/nativewindow/native/x11/Xmisc.c index 1258c9f8f..a0aa27e13 100644 --- a/src/nativewindow/native/x11/Xmisc.c +++ b/src/nativewindow/native/x11/Xmisc.c @@ -170,13 +170,15 @@ static int errorHandlerQuiet = 0 ; static int x11ErrorHandler(Display *dpy, XErrorEvent *e) { + const char * errStr = strerror(errno); + + fprintf(stderr, "Info: Nativewindow X11 Error: Display %p, Code 0x%X, errno %s\n", dpy, e->error_code, errStr); + fflush(stderr); + if(!errorHandlerQuiet) { JNIEnv *curEnv = NULL; JNIEnv *newEnv = NULL; int envRes ; - const char * errStr = strerror(errno); - - fprintf(stderr, "Info: Nativewindow X11 Error: Display %p, Code 0x%X, errno %s\n", dpy, e->error_code, errStr); // retrieve this thread's JNIEnv curEnv - or detect it's detached envRes = (*jvmHandle)->GetEnv(jvmHandle, (void **) &curEnv, jvmVersion) ; |