From a7340fd941b26d633c438cb5adb22f2c30a5cff0 Mon Sep 17 00:00:00 2001 From: Sven Gothel Date: Wed, 31 Aug 2011 15:46:29 +0200 Subject: NativeWindow X11 Error Handler: Even if quiet, print message on stderr. --- src/nativewindow/native/x11/Xmisc.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) (limited to 'src/nativewindow/native/x11/Xmisc.c') 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) ; -- cgit v1.2.3