diff options
-rwxr-xr-x | make/scripts/java-run-all.sh | 4 | ||||
-rwxr-xr-x | make/scripts/tests.sh | 2 | ||||
-rw-r--r-- | make/scripts/tests2.sh | 20 | ||||
-rw-r--r-- | src/jogl/classes/com/jogamp/opengl/impl/egl/EGLContext.java | 4 | ||||
-rw-r--r-- | src/jogl/classes/com/jogamp/opengl/impl/macosx/cgl/MacOSXCGLContext.java | 6 | ||||
-rw-r--r-- | src/nativewindow/classes/com/jogamp/nativewindow/impl/ProxySurface.java | 2 | ||||
-rw-r--r-- | src/nativewindow/classes/javax/media/nativewindow/GraphicsConfigurationFactory.java | 2 | ||||
-rw-r--r-- | src/nativewindow/classes/javax/media/nativewindow/ToolkitLock.java | 2 | ||||
-rw-r--r-- | src/nativewindow/native/x11/Xmisc.c | 16 | ||||
-rw-r--r-- | src/newt/native/X11Window.c | 9 |
10 files changed, 41 insertions, 26 deletions
diff --git a/make/scripts/java-run-all.sh b/make/scripts/java-run-all.sh index d28c0953c..aeda83ffb 100755 --- a/make/scripts/java-run-all.sh +++ b/make/scripts/java-run-all.sh @@ -49,8 +49,8 @@ uname -a | grep -i Darwin && MOSX=1 # D_ARGS="-Dnewt.debug.Window -Dnewt.debug.Display -Dnewt.debug.EDT" # D_ARGS="-Dnewt.debug.EDT -Dnewt.debug.Window" # D_ARGS="-Dsun.awt.disableMixing=true -Dnewt.debug.EDT" -D_ARGS="-Dnewt.debug.EDT -Dnativewindow.TraceLock" -# D_ARGS="-Djogamp.debug.TraceLock" +D_ARGS="-Dnewt.debug.EDT -Dnativewindow.debug.ToolkitLock.TraceLock" +# D_ARGS="-Djogamp.debug.Lock.TraceLock" # D_ARGS="-Dnewt.debug.Display" # D_ARGS="-Djogl.debug.Animator -Dnewt.debug.Window -Dnewt.debug.Display" # D_ARGS="-Dnewt.debug.Window -Dnewt.debug.Display -Dnewt.test.Window.reparent.incompatible=true" diff --git a/make/scripts/tests.sh b/make/scripts/tests.sh index 7246a7ec4..b7033d3e1 100755 --- a/make/scripts/tests.sh +++ b/make/scripts/tests.sh @@ -33,7 +33,7 @@ spath=`dirname $0` # $spath/java-run-all.sh ../build-x86_64 com.jogamp.test.junit.newt.parenting.TestParenting03AWT $* # $spath/java-run-all.sh ../build-x86_64 com.jogamp.test.junit.jogl.awt.TestSwingAWTRobotUsageBeforeJOGLInitBug411 $* -# $spath/java-run-all.sh ../build-x86_64 -Dnativewindow.TraceLock=true com.jogamp.test.junit.jogl.awt.TestSwingAWTRobotUsageBeforeJOGLInitBug411 $* +# $spath/java-run-all.sh ../build-x86_64 -Dnativewindow.debug.ToolkitLock.TraceLock com.jogamp.test.junit.jogl.awt.TestSwingAWTRobotUsageBeforeJOGLInitBug411 $* # $spath/java-run-all.sh ../build-x86_64 com.jogamp.test.junit.newt.TestFocus01SwingAWTRobot $* # $spath/java-run-all.sh ../build-x86_64 com.jogamp.test.junit.newt.TestFocus02SwingAWTRobot $* diff --git a/make/scripts/tests2.sh b/make/scripts/tests2.sh index cce1c3e19..19ecb123a 100644 --- a/make/scripts/tests2.sh +++ b/make/scripts/tests2.sh @@ -16,27 +16,35 @@ echo LIBGL_DEBUG: $LIBGL_DEBUG 2>&1 | tee -a java-run.log echo java $X_ARGS $D_ARGS $* 2>&1 | tee -a java-run.log function jrun() { + awtarg=$1 + shift # D_ARGS="-Djogamp.debug.TraceLock" - # D_ARGS="-Dnewt.debug.EDT -Dnativewindow.TraceLock -Dnativewindow.debug.NativeWindow" + # D_ARGS="-Dnewt.debug.EDT -Dnativewindow.debug.ToolkitLock.TraceLock -Dnativewindow.debug.NativeWindow" # D_ARGS="-Dnewt.debug.Window -Dnewt.debug.Display -Dnewt.debug.EDT" - # D_ARGS="-Dnewt.debug.EDT -Dnativewindow.TraceLock -Dnativewindow.debug.X11Util.TraceDisplayLifecycle=true" + # D_ARGS="-Dnewt.debug.EDT -Dnativewindow.debug.ToolkitLock.TraceLock -Dnativewindow.debug.X11Util.TraceDisplayLifecycle=true" #D_ARGS="-Djogamp.common.utils.locks.Lock.timeout=600000 -Djogamp.debug.Lock -Djogamp.debug.Lock.TraceLock" # D_ARGS="-Dnewt.debug.Window -Dnewt.debug.EDT -Dnewt.debug.Display " #D_ARGS="-Dnewt.debug.EDT -Djogamp.common.utils.locks.Lock.timeout=600000 -Djogl.debug.Animator -Dnewt.debug.Display -Dnewt.debug.Screen" #D_ARGS="-Dnewt.debug.EDT -Dnewt.debug.Display -Dnativewindow.debug.X11Util -Djogl.debug.GLDrawable -Djogl.debug.GLCanvas" #D_ARGS="-Dnewt.debug.EDT -Djogl.debug.GLContext" #D_ARGS="-Dnewt.debug.Screen -Dnewt.debug.EDT" - D_ARGS="-Dnewt.debug.EDT" + #D_ARGS="-Dnewt.debug.EDT" + D_ARGS="-Dnewt.debug.EDT -Djogl.debug=all -Dnativewindow.debug=all" # D_ARGS="-Djogl.debug=all" - java $X_ARGS $D_ARGS $* 2>&1 | tee -a java-run.log + java $awtarg $X_ARGS $D_ARGS $* 2>&1 | tee -a java-run.log } +function testnoawt() { + jrun -Djava.awt.headless=true $* +} function testawt() { - jrun $* + jrun -Djava.awt.headless=false $* } +testnoawt com.jogamp.test.junit.jogl.acore.TestGLProfile01NEWT $* #testawt com.jogamp.test.junit.jogl.acore.TestGLProfile01NEWT $* + #testawt com.jogamp.test.junit.jogl.awt.TestAWT01GLn $* #testawt com.jogamp.test.junit.jogl.awt.TestAWT02WindowClosing #testawt com.jogamp.test.junit.jogl.awt.TestSwingAWT01GLn @@ -46,7 +54,7 @@ function testawt() { #testawt com.jogamp.test.junit.jogl.texture.TestTexture01AWT #testawt com.jogamp.test.junit.newt.TestEventSourceNotAWTBug #testawt com.jogamp.test.junit.newt.TestFocus01SwingAWTRobot -testawt com.jogamp.test.junit.newt.TestFocus02SwingAWTRobot +#testawt com.jogamp.test.junit.newt.TestFocus02SwingAWTRobot #testawt com.jogamp.test.junit.newt.TestListenerCom01AWT #testawt com.jogamp.test.junit.newt.parenting.TestParenting01aAWT #testawt com.jogamp.test.junit.newt.parenting.TestParenting01bAWT diff --git a/src/jogl/classes/com/jogamp/opengl/impl/egl/EGLContext.java b/src/jogl/classes/com/jogamp/opengl/impl/egl/EGLContext.java index 65f16089b..d8b5b78f2 100644 --- a/src/jogl/classes/com/jogamp/opengl/impl/egl/EGLContext.java +++ b/src/jogl/classes/com/jogamp/opengl/impl/egl/EGLContext.java @@ -207,7 +207,7 @@ public abstract class EGLContext extends GLContextImpl { if(null != table) { eglExtProcAddressTable = table; if(DEBUG) { - System.err.println("GLContext EGL ProcAddressTable reusing key("+major+","+minor+","+ctp+") -> "+table.hashCode()); + System.err.println(getThreadName() + ": !!! GLContext EGL ProcAddressTable reusing key("+major+","+minor+","+ctp+") -> "+table.hashCode()); } } else { if (eglExtProcAddressTable == null) { @@ -219,7 +219,7 @@ public abstract class EGLContext extends GLContextImpl { synchronized(mappedProcAddressLock) { mappedGLXProcAddress.put(key, getEGLExtProcAddressTable()); if(DEBUG) { - System.err.println("GLContext EGL ProcAddressTable mapping key("+major+","+minor+","+ctp+") -> "+getEGLExtProcAddressTable().hashCode()); + System.err.println(getThreadName() + ": !!! GLContext EGL ProcAddressTable mapping key("+major+","+minor+","+ctp+") -> "+getEGLExtProcAddressTable().hashCode()); } } } diff --git a/src/jogl/classes/com/jogamp/opengl/impl/macosx/cgl/MacOSXCGLContext.java b/src/jogl/classes/com/jogamp/opengl/impl/macosx/cgl/MacOSXCGLContext.java index ad7dac85f..f9934fe20 100644 --- a/src/jogl/classes/com/jogamp/opengl/impl/macosx/cgl/MacOSXCGLContext.java +++ b/src/jogl/classes/com/jogamp/opengl/impl/macosx/cgl/MacOSXCGLContext.java @@ -226,7 +226,7 @@ public abstract class MacOSXCGLContext extends GLContextImpl protected void updateGLProcAddressTable(int major, int minor, int ctp) { if (DEBUG) { - System.err.println("!!! Initializing CGL extension address table"); + System.err.println(getThreadName() + ": !!! Initializing CGL extension address table"); } int key = compose8bit(major, minor, ctp, 0); CGLExtProcAddressTable table = null; @@ -236,7 +236,7 @@ public abstract class MacOSXCGLContext extends GLContextImpl if(null != table) { cglExtProcAddressTable = table; if(DEBUG) { - System.err.println("GLContext CGL ProcAddressTable reusing key("+major+","+minor+","+ctp+") -> "+table.hashCode()); + System.err.println(getThreadName() + ": !!! GLContext CGL ProcAddressTable reusing key("+major+","+minor+","+ctp+") -> "+table.hashCode()); } } else { if (cglExtProcAddressTable == null) { @@ -248,7 +248,7 @@ public abstract class MacOSXCGLContext extends GLContextImpl synchronized(mappedProcAddressLock) { mappedGLXProcAddress.put(key, getCGLExtProcAddressTable()); if(DEBUG) { - System.err.println("GLContext CGL ProcAddressTable mapping key("+major+","+minor+","+ctp+") -> "+getCGLExtProcAddressTable().hashCode()); + System.err.println(getThreadName() + ": !!! GLContext CGL ProcAddressTable mapping key("+major+","+minor+","+ctp+") -> "+getCGLExtProcAddressTable().hashCode()); } } } diff --git a/src/nativewindow/classes/com/jogamp/nativewindow/impl/ProxySurface.java b/src/nativewindow/classes/com/jogamp/nativewindow/impl/ProxySurface.java index eebcdb0ab..de766acbf 100644 --- a/src/nativewindow/classes/com/jogamp/nativewindow/impl/ProxySurface.java +++ b/src/nativewindow/classes/com/jogamp/nativewindow/impl/ProxySurface.java @@ -147,7 +147,7 @@ public class ProxySurface implements NativeSurface, SurfaceChangeable { } public String toString() { - return "NullWindow[config "+config+ + return "ProxySurface[config "+config+ ", displayHandle 0x"+Long.toHexString(getDisplayHandle())+ ", surfaceHandle 0x"+Long.toHexString(getSurfaceHandle())+ ", size "+getWidth()+"x"+getHeight()+"]"; diff --git a/src/nativewindow/classes/javax/media/nativewindow/GraphicsConfigurationFactory.java b/src/nativewindow/classes/javax/media/nativewindow/GraphicsConfigurationFactory.java index 75c8aea22..1d3a7445f 100644 --- a/src/nativewindow/classes/javax/media/nativewindow/GraphicsConfigurationFactory.java +++ b/src/nativewindow/classes/javax/media/nativewindow/GraphicsConfigurationFactory.java @@ -71,8 +71,6 @@ public abstract class GraphicsConfigurationFactory { } private static void initialize() { - String factoryClassName = null; - abstractGraphicsDeviceClass = javax.media.nativewindow.AbstractGraphicsDevice.class; if (NativeWindowFactory.TYPE_X11.equals(NativeWindowFactory.getNativeWindowType(true))) { diff --git a/src/nativewindow/classes/javax/media/nativewindow/ToolkitLock.java b/src/nativewindow/classes/javax/media/nativewindow/ToolkitLock.java index 09c89ebe3..226998860 100644 --- a/src/nativewindow/classes/javax/media/nativewindow/ToolkitLock.java +++ b/src/nativewindow/classes/javax/media/nativewindow/ToolkitLock.java @@ -38,7 +38,7 @@ import java.security.AccessController; * One use case is the AWT locking on X11, see {@link com.jogamp.nativewindow.impl.jawt.JAWTToolkitLock}. */ public interface ToolkitLock { - public static final boolean TRACE_LOCK = Debug.isPropertyDefined("nativewindow.TraceLock", true, AccessController.getContext()); + public static final boolean TRACE_LOCK = Debug.isPropertyDefined("nativewindow.debug.ToolkitLock.TraceLock", true, AccessController.getContext()); public void lock(); public void unlock(); diff --git a/src/nativewindow/native/x11/Xmisc.c b/src/nativewindow/native/x11/Xmisc.c index 31d57240f..5a17bdb8f 100644 --- a/src/nativewindow/native/x11/Xmisc.c +++ b/src/nativewindow/native/x11/Xmisc.c @@ -420,13 +420,18 @@ JNIEXPORT jlong JNICALL Java_com_jogamp_nativewindow_impl_x11_X11Lib_CreateDummy windowParent = XRootWindowOfScreen(scrn); } - attrMask = (CWBackPixel | CWBorderPixel | CWColormap | CWOverrideRedirect) ; + attrMask = ( CWBackingStore | CWBackingPlanes | CWBackingPixel | CWBackPixel | + CWBorderPixel | CWColormap | CWOverrideRedirect ) ; memset(&xswa, 0, sizeof(xswa)); - xswa.override_redirect = True; // not decorated + xswa.override_redirect = False; // use the window manager, always xswa.border_pixel = 0; xswa.background_pixel = 0; - xswa.event_mask = 0 ; // no events + 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), visual, @@ -443,6 +448,11 @@ JNIEXPORT jlong JNICALL Java_com_jogamp_nativewindow_impl_x11_X11Lib_CreateDummy attrMask, &xswa); + XSync(dpy, False); + + XSelectInput(dpy, window, 0); // no events + XSync(dpy, False); + x11ErrorHandlerEnable(dpy, 0, env); DBG_PRINT( "X11: [CreateWindow] created window %p on display %p\n", window, dpy); diff --git a/src/newt/native/X11Window.c b/src/newt/native/X11Window.c index 025c0e500..7b09ffeb0 100644 --- a/src/newt/native/X11Window.c +++ b/src/newt/native/X11Window.c @@ -289,8 +289,6 @@ JNIEXPORT void JNICALL Java_com_jogamp_newt_impl_x11_X11Display_CompleteDisplay0 * Window */ -#define WINDOW_EVENT_MASK ( FocusChangeMask | SubstructureNotifyMask | StructureNotifyMask | ExposureMask ) - static int putPtrIn32Long(unsigned long * dst, uintptr_t src) { int i=0; dst[i++] = (unsigned long) ( ( src >> 0 ) & 0xFFFFFFFF ) ; @@ -1335,9 +1333,10 @@ JNIEXPORT jlong JNICALL Java_com_jogamp_newt_impl_x11_X11Window_CreateWindow0 { long xevent_mask = 0; - xevent_mask |= ButtonPressMask | ButtonReleaseMask | PointerMotionMask; - xevent_mask |= KeyPressMask | KeyReleaseMask; - xevent_mask |= WINDOW_EVENT_MASK ; + xevent_mask |= ButtonPressMask | ButtonReleaseMask | PointerMotionMask ; + xevent_mask |= KeyPressMask | KeyReleaseMask ; + xevent_mask |= FocusChangeMask | SubstructureNotifyMask | StructureNotifyMask | ExposureMask ; + XSelectInput(dpy, window, xevent_mask); } |