summaryrefslogtreecommitdiffstats
path: root/src/newt/native/X11Window.c
diff options
context:
space:
mode:
authorSven Gothel <[email protected]>2009-09-12 12:32:44 -0700
committerSven Gothel <[email protected]>2009-09-12 12:32:44 -0700
commit3cc7335e94df9daaab5250487b9f03e19aaa292a (patch)
tree942e6dd5d8bac2499c49c3e9b9910f8b84b5ed42 /src/newt/native/X11Window.c
parentf6541cee3b33bd6ad5a94e89d860b4431cf2a353 (diff)
NEWT: Basic/Naive window parenting support ; NEWT GLWindow: remove ambigous create functions, ie with Window and Capabilities arguments
Diffstat (limited to 'src/newt/native/X11Window.c')
-rwxr-xr-xsrc/newt/native/X11Window.c10
1 files changed, 6 insertions, 4 deletions
diff --git a/src/newt/native/X11Window.c b/src/newt/native/X11Window.c
index 8651a8cea..1e7cd3bba 100755
--- a/src/newt/native/X11Window.c
+++ b/src/newt/native/X11Window.c
@@ -511,17 +511,17 @@ JNIEXPORT jboolean JNICALL Java_com_sun_javafx_newt_x11_X11Window_initIDs
/*
* Class: com_sun_javafx_newt_x11_X11Window
* Method: CreateWindow
- * Signature: (JIJIIII)J
+ * Signature: (JJIJIIII)J
*/
JNIEXPORT jlong JNICALL Java_com_sun_javafx_newt_x11_X11Window_CreateWindow
- (JNIEnv *env, jobject obj, jlong display, jint screen_index,
+ (JNIEnv *env, jobject obj, jlong parent, jlong display, jint screen_index,
jlong visualID,
jlong javaObjectAtom, jlong windowDeleteAtom,
jint x, jint y, jint width, jint height)
{
Display * dpy = (Display *)(intptr_t)display;
int scrn_idx = (int)screen_index;
- Window windowParent = 0;
+ Window windowParent = (Window) parent;
Window window = 0;
XVisualInfo visualTemplate;
@@ -578,7 +578,9 @@ JNIEXPORT jlong JNICALL Java_com_sun_javafx_newt_x11_X11Window_CreateWindow
pVisualQuery=NULL;
}
- windowParent = XRootWindowOfScreen(scrn);
+ if(NULL==windowParent) {
+ windowParent = XRootWindowOfScreen(scrn);
+ }
attrMask = (CWBackPixel | CWBorderPixel | CWColormap | CWEventMask | CWOverrideRedirect) ;