summaryrefslogtreecommitdiffstats
path: root/src/newt/native
diff options
context:
space:
mode:
Diffstat (limited to 'src/newt/native')
-rwxr-xr-xsrc/newt/native/X11Window.c21
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);
}