From 5bcb6d13859d96649e30e02cbc4e9cbe5417a23e Mon Sep 17 00:00:00 2001
From: Sven Gothel <sgothel@jausoft.com>
Date: Wed, 31 Aug 2011 17:34:21 +0200
Subject: revert: a7340fd941b26d633c438cb5adb22f2c30a5cff0

NativeWindow X11 Error Handler: If quiet do not print message on stderr.
---
 src/nativewindow/native/x11/Xmisc.c | 9 ++++-----
 1 file changed, 4 insertions(+), 5 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 a0aa27e13..cc0b1a1ef 100644
--- a/src/nativewindow/native/x11/Xmisc.c
+++ b/src/nativewindow/native/x11/Xmisc.c
@@ -170,15 +170,14 @@ 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);
+        fflush(stderr);
 
         // retrieve this thread's JNIEnv curEnv - or detect it's detached
         envRes = (*jvmHandle)->GetEnv(jvmHandle, (void **) &curEnv, jvmVersion) ;
-- 
cgit v1.2.3