summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorSven Gothel <[email protected]>2010-11-02 23:12:37 +0100
committerSven Gothel <[email protected]>2010-11-02 23:12:37 +0100
commitaf3de7dd59bcebde68f3928868b5dde198978854 (patch)
tree3ccea0a38562b47b6ff11100967c82bcc1fc0b2e /src
parent81c02065e28113ffed021b0c69cccc3d4747c6b1 (diff)
Minor cleanup: strings, unused vars, ..
DEBUG strings w/ thread name nativewindow.TraceLock -> nativewindow.debug.ToolkitLock.TraceLock Sync Xmisc (DummyWindow) with NEWT's creation test scripts: awt and non-awt usage
Diffstat (limited to 'src')
-rw-r--r--src/jogl/classes/com/jogamp/opengl/impl/egl/EGLContext.java4
-rw-r--r--src/jogl/classes/com/jogamp/opengl/impl/macosx/cgl/MacOSXCGLContext.java6
-rw-r--r--src/nativewindow/classes/com/jogamp/nativewindow/impl/ProxySurface.java2
-rw-r--r--src/nativewindow/classes/javax/media/nativewindow/GraphicsConfigurationFactory.java2
-rw-r--r--src/nativewindow/classes/javax/media/nativewindow/ToolkitLock.java2
-rw-r--r--src/nativewindow/native/x11/Xmisc.c16
-rw-r--r--src/newt/native/X11Window.c9
7 files changed, 24 insertions, 17 deletions
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);
}