aboutsummaryrefslogtreecommitdiffstats
path: root/src/nativewindow/native/x11/Xmisc.c
diff options
context:
space:
mode:
authorSven Gothel <[email protected]>2010-11-14 08:50:12 +0100
committerSven Gothel <[email protected]>2010-11-14 08:50:12 +0100
commitf2de12dd8d20ba7a08d9c97f5ac9f51c94b693cc (patch)
tree09a5cb79dbd71942721bf26a51f22389b9b14be8 /src/nativewindow/native/x11/Xmisc.c
parent957b02dbaf386ba635146ed702193ff8b9a548d2 (diff)
NEWT: Add optional eager native initialization ; Proper exception handling
NEWT: Add optional eager native initialization of Display and Screen to overcome a possible chicken/egg situation. This is useful to be able to request the AbstractGraphicsDevice, via getGraphicsDevice(). Otherwise the abstract device won't be available before the dependent components (Screen and Window) are realized. Throw NativeWindowException in case native creation failed.
Diffstat (limited to 'src/nativewindow/native/x11/Xmisc.c')
-rw-r--r--src/nativewindow/native/x11/Xmisc.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/nativewindow/native/x11/Xmisc.c b/src/nativewindow/native/x11/Xmisc.c
index 831d94636..290ec14cf 100644
--- a/src/nativewindow/native/x11/Xmisc.c
+++ b/src/nativewindow/native/x11/Xmisc.c
@@ -185,8 +185,14 @@ static int errorHandlerBlocked = 0 ;
static int x11ErrorHandler(Display *dpy, XErrorEvent *e)
{
+ fprintf(stderr, "Info: Nativewindow X11 Error: Display %p, Code 0x%X, errno %s", dpy, e->error_code, strerror(errno));
+#if 0
+ // Since the X11 Error may happen anytime, a exception could mess up the JVM completely.
+ // Experienced this for remote displays issuing non supported commands, eg. glXCreateContextAttribsARB(..)
+ //
_throwNewRuntimeException(NULL, x11ErrorHandlerJNIEnv, "Info: Nativewindow X11 Error: Display %p, Code 0x%X, errno %s",
dpy, e->error_code, strerror(errno));
+#endif
#if 0
if(NULL!=origErrorHandler) {