diff options
-rw-r--r-- | src/newt/native/X11Common.h | 6 | ||||
-rw-r--r-- | src/newt/native/X11Display.c | 6 | ||||
-rw-r--r-- | src/newt/native/X11Window.c | 10 |
3 files changed, 13 insertions, 9 deletions
diff --git a/src/newt/native/X11Common.h b/src/newt/native/X11Common.h index 20c72752c..cefef690f 100644 --- a/src/newt/native/X11Common.h +++ b/src/newt/native/X11Common.h @@ -58,7 +58,7 @@ #include "NewtCommon.h" -#define VERBOSE_ON 1 +// #define VERBOSE_ON 1 #ifdef VERBOSE_ON #define DBG_PRINT(...) fprintf(stderr, __VA_ARGS__); fflush(stderr) @@ -72,5 +72,9 @@ extern jmethodID visibleChangedID; jobject getJavaWindowProperty(JNIEnv *env, Display *dpy, Window window, jlong javaObjectAtom, Bool showWarning); +void NewtDisplay_displayDispatchErrorHandlerEnable(int onoff, JNIEnv * env); +Status NewtWindows_getRootAndParent (Display *dpy, Window w, Window * root_return, Window * parent_return); +Status NewtWindows_updateInsets(JNIEnv *env, jobject jwindow, Display *dpy, Window window, int *left, int *right, int *top, int *bottom); + #endif /* _X11COMMON_H_ */ diff --git a/src/newt/native/X11Display.c b/src/newt/native/X11Display.c index d6a099f1d..283636040 100644 --- a/src/newt/native/X11Display.c +++ b/src/newt/native/X11Display.c @@ -94,7 +94,7 @@ static int displayDispatchErrorHandler(Display *dpy, XErrorEvent *e) return 0; } -static void displayDispatchErrorHandlerEnable(int onoff, JNIEnv * env) { +void NewtDisplay_displayDispatchErrorHandlerEnable(int onoff, JNIEnv * env) { if(onoff) { if(NULL==origErrorHandler) { setupJVMVars(env); @@ -403,7 +403,7 @@ JNIEXPORT void JNICALL Java_jogamp_newt_driver_x11_X11Display_DispatchMessages0 // DBG_PRINT( "X11: DispatchMessages dpy %p, win %p, Event %d\n", (void*)dpy, (void*)evt.xany.window, (int)evt.type); - displayDispatchErrorHandlerEnable(1, env); + NewtDisplay_displayDispatchErrorHandlerEnable(1, env); jwindow = getJavaWindowProperty(env, dpy, evt.xany.window, javaObjectAtom, #ifdef VERBOSE_ON @@ -413,7 +413,7 @@ JNIEXPORT void JNICALL Java_jogamp_newt_driver_x11_X11Display_DispatchMessages0 #endif ); - displayDispatchErrorHandlerEnable(0, env); + NewtDisplay_displayDispatchErrorHandlerEnable(0, env); if(NULL==jwindow) { fprintf(stderr, "Warning: NEWT X11 DisplayDispatch %p, Couldn't handle event %d for X11 window %p\n", diff --git a/src/newt/native/X11Window.c b/src/newt/native/X11Window.c index 25c73dd10..1c74b7b7c 100644 --- a/src/newt/native/X11Window.c +++ b/src/newt/native/X11Window.c @@ -143,7 +143,7 @@ jobject getJavaWindowProperty(JNIEnv *env, Display *dpy, Window window, jlong ja } /** @return zero if fails, non zero if OK */ -static Status NewtWindows_getRootAndParent (Display *dpy, Window w, Window * root_return, Window * parent_return) { +Status NewtWindows_getRootAndParent (Display *dpy, Window w, Window * root_return, Window * parent_return) { Window *children_return=NULL; unsigned int nchildren_return=0; @@ -224,7 +224,7 @@ static Status NewtWindows_getFrameExtends(Display *dpy, Window window, int *left return 1; // Ok } -static Status NewtWindows_updateInsets(JNIEnv *env, jobject jwindow, Display *dpy, Window window, int *left, int *right, int *top, int *bottom) { +Status NewtWindows_updateInsets(JNIEnv *env, jobject jwindow, Display *dpy, Window window, int *left, int *right, int *top, int *bottom) { if(0 != NewtWindows_getFrameExtends(dpy, window, left, right, top, bottom)) { DBG_PRINT( "NewtWindows_updateInsets: insets by _NET_FRAME_EXTENTS [ l %d, r %d, t %d, b %d ]\n", *left, *right, *top, *bottom); @@ -713,7 +713,7 @@ JNIEXPORT void JNICALL Java_jogamp_newt_driver_x11_X11Window_reconfigureWindow0 fsEWMHFlags |= _NET_WM_ABOVE; // toggle above only } - displayDispatchErrorHandlerEnable(1, env); + NewtDisplay_displayDispatchErrorHandlerEnable(1, env); DBG_PRINT( "X11: reconfigureWindow0 dpy %p, scrn %d, parent %p/%p, win %p, %d/%d %dx%d, parentChange %d, hasParent %d, decorationChange %d, undecorated %d, fullscreenChange %d, fullscreen %d, alwaysOnTopChange %d, alwaysOnTop %d, visibleChange %d, visible %d, tempInvisible %d, fsEWMHFlags %d\n", (void*)dpy, screen_index, (void*) jparent, (void*)parent, (void*)w, @@ -731,7 +731,7 @@ JNIEXPORT void JNICALL Java_jogamp_newt_driver_x11_X11Window_reconfigureWindow0 ( TST_FLAG_CHANGE_FULLSCREEN(flags) || TST_FLAG_CHANGE_ALWAYSONTOP(flags) ) ) { Bool enable = TST_FLAG_CHANGE_FULLSCREEN(flags) ? TST_FLAG_IS_FULLSCREEN(flags) : TST_FLAG_IS_ALWAYSONTOP(flags) ; if( NewtWindows_setFullscreenEWMH(dpy, root, w, fsEWMHFlags, isVisible, enable) ) { - displayDispatchErrorHandlerEnable(0, env); + NewtDisplay_displayDispatchErrorHandlerEnable(0, env); return; } } @@ -795,7 +795,7 @@ JNIEXPORT void JNICALL Java_jogamp_newt_driver_x11_X11Window_reconfigureWindow0 NewtWindows_setFullscreenEWMH(dpy, root, w, fsEWMHFlags, isVisible, True); } - displayDispatchErrorHandlerEnable(0, env); + NewtDisplay_displayDispatchErrorHandlerEnable(0, env); DBG_PRINT( "X11: reconfigureWindow0 X\n"); } |