aboutsummaryrefslogtreecommitdiffstats
path: root/src/nativewindow/classes/javax
diff options
context:
space:
mode:
Diffstat (limited to 'src/nativewindow/classes/javax')
-rw-r--r--src/nativewindow/classes/javax/media/nativewindow/ToolkitLock.java5
-rw-r--r--src/nativewindow/classes/javax/media/nativewindow/x11/X11GraphicsScreen.java9
2 files changed, 5 insertions, 9 deletions
diff --git a/src/nativewindow/classes/javax/media/nativewindow/ToolkitLock.java b/src/nativewindow/classes/javax/media/nativewindow/ToolkitLock.java
index 27e59d8c8..6f83896fa 100644
--- a/src/nativewindow/classes/javax/media/nativewindow/ToolkitLock.java
+++ b/src/nativewindow/classes/javax/media/nativewindow/ToolkitLock.java
@@ -47,8 +47,9 @@ package javax.media.nativewindow;
<PRE>
NativeWindowFactory.getDefaultFactory().getToolkitLock().lock();
try {
- long displayHandle = X11Util.getStaticDefaultDisplay();
- ...
+ long displayHandle = X11Util.getThreadLocalDefaultDisplay();
+ ... some code dealing with shared resources
+ ... ie the window surface
} finally {
NativeWindowFactory.getDefaultFactory().getToolkitLock().unlock();
}
diff --git a/src/nativewindow/classes/javax/media/nativewindow/x11/X11GraphicsScreen.java b/src/nativewindow/classes/javax/media/nativewindow/x11/X11GraphicsScreen.java
index f434050f2..03121dfaa 100644
--- a/src/nativewindow/classes/javax/media/nativewindow/x11/X11GraphicsScreen.java
+++ b/src/nativewindow/classes/javax/media/nativewindow/x11/X11GraphicsScreen.java
@@ -74,13 +74,8 @@ public class X11GraphicsScreen extends DefaultGraphicsScreen implements Cloneabl
}
private static int fetchScreen(int screen) {
- NativeWindowFactory.getDefaultFactory().getToolkitLock().lock();
- try {
- if(!com.sun.nativewindow.impl.x11.X11Util.isXineramaEnabledOnStaticDefaultDisplay()) {
- return screen;
- }
- } finally {
- NativeWindowFactory.getDefaultFactory().getToolkitLock().unlock();
+ if(!com.sun.nativewindow.impl.x11.X11Util.isXineramaEnabledOnThreadLocalDefaultDisplay()) {
+ return screen;
}
return 0;
}