diff options
author | Sven Gothel <[email protected]> | 2009-09-12 15:16:59 -0700 |
---|---|---|
committer | Sven Gothel <[email protected]> | 2009-09-12 15:16:59 -0700 |
commit | 4fe426caf55889d17b387efa06551c1af8f0dabe (patch) | |
tree | ccd41a542053de870339485b902d180d4029ebb0 /src/newt/native | |
parent | 3cc7335e94df9daaab5250487b9f03e19aaa292a (diff) |
NEWT: Native window parenting (X11: OK); AWTWindow external Frame OK
Diffstat (limited to 'src/newt/native')
-rwxr-xr-x | src/newt/native/X11Window.c | 21 |
1 files changed, 8 insertions, 13 deletions
diff --git a/src/newt/native/X11Window.c b/src/newt/native/X11Window.c index 1e7cd3bba..79457031f 100755 --- a/src/newt/native/X11Window.c +++ b/src/newt/native/X11Window.c @@ -578,7 +578,7 @@ JNIEXPORT jlong JNICALL Java_com_sun_javafx_newt_x11_X11Window_CreateWindow pVisualQuery=NULL; } - if(NULL==windowParent) { + if(0==windowParent) { windowParent = XRootWindowOfScreen(scrn); } @@ -710,12 +710,12 @@ JNIEXPORT void JNICALL Java_com_sun_javafx_newt_x11_X11Window_setVisible0 * Signature: (JIJIIIIIZ)V */ JNIEXPORT void JNICALL Java_com_sun_javafx_newt_x11_X11Window_setSize0 - (JNIEnv *env, jobject obj, jlong display, jint screen_index, jlong window, jint x, jint y, jint width, jint height, jint decorationToggle, jboolean isVisible) + (JNIEnv *env, jobject obj, jlong jparent, jlong display, jint screen_index, jlong window, jint x, jint y, jint width, jint height, jint decorationToggle, jboolean setVisible) { Display * dpy = (Display *) (intptr_t) display; Window w = (Window)window; Screen * scrn = ScreenOfDisplay(dpy, (int)screen_index); - Window parent = XRootWindowOfScreen(scrn); + Window parent = (0!=jparent)?(Window)jparent:XRootWindowOfScreen(scrn); XWindowChanges xwc; @@ -723,6 +723,11 @@ JNIEXPORT void JNICALL Java_com_sun_javafx_newt_x11_X11Window_setSize0 XSync(dpy, False); + if(setVisible==JNI_TRUE) { + XMapRaised(dpy, w); + XSync(dpy, False); + } + if(0!=decorationToggle) { #ifdef MWM_FULLSCREEN unsigned long mwmhints[PROP_MWM_HINTS_ELEMENTS] = { 0, 0, 0, 0, 0 }; // flags, functions, decorations, input_mode, status @@ -756,16 +761,6 @@ JNIEXPORT void JNICALL Java_com_sun_javafx_newt_x11_X11Window_setSize0 XSync(dpy, False); - /** if(isVisible==JNI_TRUE) { - // this .. - XSetInputFocus(dpy, w, RevertToNone, CurrentTime); - - // or this .. - unsigned long wmleader[1] = { (unsigned long) w}; - Atom prop = XInternAtom( dpy, "WM_CLIENT_LEADER", False ); - XChangeProperty( dpy, w, prop, prop, 32, PropModeReplace, (unsigned char *)&wmleader, 1); - } */ - DBG_PRINT0( "setSize0 . sizeChangedID call\n"); (*env)->CallVoidMethod(env, obj, sizeChangedID, (jint) width, (jint) height); } |