From d370be30dc75cc3b63246f026090a7377bf07135 Mon Sep 17 00:00:00 2001 From: Sven Gothel Date: Tue, 27 Apr 2010 07:18:54 +0200 Subject: - Fix GLProcAddressResolver regression: Use GLProcAddressResolver ! - X11GLXDrawableFactory: - Move shared resource creation/destruction into it's own thread - Remove the ATI hack (no XDisplay closing) for every Display, this is only necessary for the shared XDisplay and in case of AWT. - Newt - Display: Only pumpMessages if device is ready. - X11Display: Verify handle not null at DispatchMessage. - Common recursive ToolkitLock implementation, from src/nativewindow/classes/com/jogamp/nativewindow/impl/LockingNativeWindowFactory.java and src/newt/classes/com/jogamp/newt/Window.java, -> com.jogamp.nativewindow.impl.RecursiveToolkitLock - Unique XLockDisplay/XUnlockDisplay call via X11Util to simplify debugging. X11Util: Added debug code for XLockDisplay/XUnlockDisplay. Added fast LongObjectHashMap Added static lib loading and initialization. Removed active and passive list, as well as unused methods, to easy maintenance. Possible since the only 'uncloseable' Display might be the shareable one. - X11Lib: Added static initialization via X11Util Test: junit/com/jogamp/test/junit/jogl/demos/gl2/gears/TestGears* - Add WindowListener for quit .. --- .../javax/media/nativewindow/x11/X11GraphicsScreen.java | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'src/nativewindow/classes/javax') diff --git a/src/nativewindow/classes/javax/media/nativewindow/x11/X11GraphicsScreen.java b/src/nativewindow/classes/javax/media/nativewindow/x11/X11GraphicsScreen.java index 58b40efe0..a18ee91c2 100644 --- a/src/nativewindow/classes/javax/media/nativewindow/x11/X11GraphicsScreen.java +++ b/src/nativewindow/classes/javax/media/nativewindow/x11/X11GraphicsScreen.java @@ -59,12 +59,12 @@ public class X11GraphicsScreen extends DefaultGraphicsScreen implements Cloneabl NativeWindowFactory.getDefaultFactory().getToolkitLock().lock(); try { long display = X11Util.createThreadLocalDefaultDisplay(); - X11Lib.XLockDisplay(display); + X11Util.XLockDisplay(display); try{ int scrnIdx = X11Lib.DefaultScreen(display); return createScreenDevice(display, scrnIdx); }finally{ - X11Lib.XUnlockDisplay(display); + X11Util.XUnlockDisplay(display); } } finally { NativeWindowFactory.getDefaultFactory().getToolkitLock().unlock(); @@ -76,12 +76,12 @@ public class X11GraphicsScreen extends DefaultGraphicsScreen implements Cloneabl NativeWindowFactory.getDefaultFactory().getToolkitLock().lock(); try { long display = getDevice().getHandle(); - X11Lib.XLockDisplay(display); + X11Util.XLockDisplay(display); try{ int scrnIdx = X11Lib.DefaultScreen(display); return X11Lib.DefaultVisualID(display, scrnIdx); }finally{ - X11Lib.XUnlockDisplay(display); + X11Util.XUnlockDisplay(display); } } finally { NativeWindowFactory.getDefaultFactory().getToolkitLock().unlock(); @@ -93,13 +93,13 @@ public class X11GraphicsScreen extends DefaultGraphicsScreen implements Cloneabl NativeWindowFactory.getDefaultFactory().getToolkitLock().lock(); try { long display = device.getHandle(); - X11Lib.XLockDisplay(display); + X11Util.XLockDisplay(display); try{ if(X11Lib.XineramaEnabled(display)) { screen = 0; // Xinerama -> 1 screen } }finally{ - X11Lib.XUnlockDisplay(display); + X11Util.XUnlockDisplay(display); } } finally { NativeWindowFactory.getDefaultFactory().getToolkitLock().unlock(); -- cgit v1.2.3