aboutsummaryrefslogtreecommitdiffstats
path: root/src/nativewindow
diff options
context:
space:
mode:
authorSven Gothel <[email protected]>2010-12-04 04:54:19 +0100
committerSven Gothel <[email protected]>2010-12-04 04:54:19 +0100
commit5d5fa6ded1811ce35bf127d68b114b6b3c2e0e7c (patch)
treeae750e08e249deb3cdf6260f3e013299bc38457a /src/nativewindow
parentd453a86de60cd4171373814f6cf7baf65ef1d7dc (diff)
X11 DummyWindow: Pass size and set size in proxy
Diffstat (limited to 'src/nativewindow')
-rw-r--r--src/nativewindow/classes/com/jogamp/nativewindow/impl/x11/X11Util.java4
-rw-r--r--src/nativewindow/native/x11/Xmisc.c11
2 files changed, 7 insertions, 8 deletions
diff --git a/src/nativewindow/classes/com/jogamp/nativewindow/impl/x11/X11Util.java b/src/nativewindow/classes/com/jogamp/nativewindow/impl/x11/X11Util.java
index ecb4a7a16..f3b7f4a4e 100644
--- a/src/nativewindow/classes/com/jogamp/nativewindow/impl/x11/X11Util.java
+++ b/src/nativewindow/classes/com/jogamp/nativewindow/impl/x11/X11Util.java
@@ -500,10 +500,10 @@ public class X11Util {
}
}
- public static long CreateDummyWindow(long display, int screen_index, long visualID) {
+ public static long CreateDummyWindow(long display, int screen_index, long visualID, int width, int height) {
lockDefaultToolkit(display);
try {
- return X11Lib.CreateDummyWindow(display, screen_index, visualID);
+ return X11Lib.CreateDummyWindow(display, screen_index, visualID, width, height);
} finally {
unlockDefaultToolkit(display);
}
diff --git a/src/nativewindow/native/x11/Xmisc.c b/src/nativewindow/native/x11/Xmisc.c
index 91292fd37..efb20c54e 100644
--- a/src/nativewindow/native/x11/Xmisc.c
+++ b/src/nativewindow/native/x11/Xmisc.c
@@ -398,10 +398,10 @@ Java_com_jogamp_nativewindow_impl_x11_X11Lib_XCloseDisplay__J(JNIEnv *env, jclas
/*
* Class: com_jogamp_nativewindow_impl_x11_X11Lib
* Method: CreateDummyWindow
- * Signature: (JIJ)J
+ * Signature: (JIJII)J
*/
JNIEXPORT jlong JNICALL Java_com_jogamp_nativewindow_impl_x11_X11Lib_CreateDummyWindow
- (JNIEnv *env, jclass unused, jlong display, jint screen_index, jlong visualID)
+ (JNIEnv *env, jclass unused, jlong display, jint screen_index, jlong visualID, jint width, jint height)
{
Display * dpy = (Display *)(intptr_t)display;
int scrn_idx = (int)screen_index;
@@ -463,17 +463,16 @@ JNIEXPORT jlong JNICALL Java_com_jogamp_nativewindow_impl_x11_X11Lib_CreateDummy
windowParent = XRootWindowOfScreen(scrn);
}
- attrMask = ( CWBackingStore | CWBackingPlanes | CWBackingPixel | CWBackPixel |
+ attrMask = ( CWBackingStore | CWBackingPlanes | CWBackingPixel | CWBackPixmap |
CWBorderPixel | CWColormap | CWOverrideRedirect ) ;
memset(&xswa, 0, sizeof(xswa));
xswa.override_redirect = False; // use the window manager, always
xswa.border_pixel = 0;
- xswa.background_pixel = 0;
+ xswa.background_pixmap = None;
xswa.backing_store=NotUseful; /* NotUseful, WhenMapped, Always */
xswa.backing_planes=0; /* planes to be preserved if possible */
xswa.backing_pixel=0; /* value to use in restoring planes */
- xswa.event_mask = 0 ; /* no events */
xswa.colormap = XCreateColormap(dpy,
XRootWindow(dpy, scrn_idx),
@@ -483,7 +482,7 @@ JNIEXPORT jlong JNICALL Java_com_jogamp_nativewindow_impl_x11_X11Lib_CreateDummy
window = XCreateWindow(dpy,
windowParent,
0, 0,
- 64, 64,
+ width, height,
0, // border width
depth,
InputOutput,