diff options
author | Sven Gothel <[email protected]> | 2010-12-04 04:54:19 +0100 |
---|---|---|
committer | Sven Gothel <[email protected]> | 2010-12-04 04:54:19 +0100 |
commit | 5d5fa6ded1811ce35bf127d68b114b6b3c2e0e7c (patch) | |
tree | ae750e08e249deb3cdf6260f3e013299bc38457a /src | |
parent | d453a86de60cd4171373814f6cf7baf65ef1d7dc (diff) |
X11 DummyWindow: Pass size and set size in proxy
Diffstat (limited to 'src')
4 files changed, 10 insertions, 11 deletions
diff --git a/src/jogl/classes/com/jogamp/opengl/impl/x11/glx/X11DummyGLXDrawable.java b/src/jogl/classes/com/jogamp/opengl/impl/x11/glx/X11DummyGLXDrawable.java index 6c8d1fc91..72698d759 100644 --- a/src/jogl/classes/com/jogamp/opengl/impl/x11/glx/X11DummyGLXDrawable.java +++ b/src/jogl/classes/com/jogamp/opengl/impl/x11/glx/X11DummyGLXDrawable.java @@ -35,7 +35,7 @@ import com.jogamp.nativewindow.impl.*; import com.jogamp.nativewindow.impl.x11.*; public class X11DummyGLXDrawable extends X11OnscreenGLXDrawable { - + private static final int f_dim = 128; private long dummyWindow = 0; /** @@ -57,8 +57,9 @@ public class X11DummyGLXDrawable extends X11OnscreenGLXDrawable { int scrn = screen.getIndex(); long visualID = config.getVisualID(); - dummyWindow = X11Util.CreateDummyWindow(dpy, scrn, visualID); + dummyWindow = X11Util.CreateDummyWindow(dpy, scrn, visualID, f_dim, f_dim); ns.setSurfaceHandle( dummyWindow ); + ns.setSize(f_dim, f_dim); updateHandle(); } 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, diff --git a/src/newt/native/X11Window.c b/src/newt/native/X11Window.c index 92e60e44b..15418269e 100644 --- a/src/newt/native/X11Window.c +++ b/src/newt/native/X11Window.c @@ -1301,7 +1301,6 @@ JNIEXPORT jlong JNICALL Java_com_jogamp_newt_impl_x11_X11Window_CreateWindow0 CWBorderPixel | CWColormap | CWOverrideRedirect ) ; memset(&xswa, 0, sizeof(xswa)); - // xswa.override_redirect = ( 0 != parent ) ? False : True; xswa.override_redirect = False; // use the window manager, always xswa.border_pixel = 0; xswa.background_pixmap = None; |