summaryrefslogtreecommitdiffstats
path: root/src/newt/classes/com
diff options
context:
space:
mode:
Diffstat (limited to 'src/newt/classes/com')
-rwxr-xr-xsrc/newt/classes/com/sun/javafx/newt/macosx/MacDisplay.java13
-rwxr-xr-xsrc/newt/classes/com/sun/javafx/newt/opengl/kd/KDDisplay.java13
-rwxr-xr-xsrc/newt/classes/com/sun/javafx/newt/windows/WindowsDisplay.java13
-rwxr-xr-xsrc/newt/classes/com/sun/javafx/newt/x11/X11Display.java13
4 files changed, 16 insertions, 36 deletions
diff --git a/src/newt/classes/com/sun/javafx/newt/macosx/MacDisplay.java b/src/newt/classes/com/sun/javafx/newt/macosx/MacDisplay.java
index 63b7fe78c..cd22b2b36 100755
--- a/src/newt/classes/com/sun/javafx/newt/macosx/MacDisplay.java
+++ b/src/newt/classes/com/sun/javafx/newt/macosx/MacDisplay.java
@@ -41,15 +41,6 @@ import com.sun.javafx.newt.util.MainThread;
public class MacDisplay extends Display {
static {
- initSingleton();
- }
-
- private static volatile boolean isInit = false;
-
- public static synchronized void initSingleton() {
- if(isInit) return;
- isInit=true;
-
NativeLibLoader.loadNEWT();
if(!initNSApplication()) {
@@ -60,6 +51,10 @@ public class MacDisplay extends Display {
}
if(DEBUG) System.out.println("MacDisplay.init App and IDs OK "+Thread.currentThread().getName());
}
+
+ public static void initSingleton() {
+ // just exist to ensure static init has been run
+ }
public MacDisplay() {
}
diff --git a/src/newt/classes/com/sun/javafx/newt/opengl/kd/KDDisplay.java b/src/newt/classes/com/sun/javafx/newt/opengl/kd/KDDisplay.java
index 64d640d11..5aeae75ea 100755
--- a/src/newt/classes/com/sun/javafx/newt/opengl/kd/KDDisplay.java
+++ b/src/newt/classes/com/sun/javafx/newt/opengl/kd/KDDisplay.java
@@ -42,15 +42,6 @@ import javax.media.nativewindow.egl.*;
public class KDDisplay extends Display {
static {
- initSingleton();
- }
-
- private static volatile boolean isInit = false;
-
- public static synchronized void initSingleton() {
- if(isInit) return;
- isInit=true;
-
NativeLibLoader.loadNEWT();
if (!KDWindow.initIDs()) {
@@ -58,6 +49,10 @@ public class KDDisplay extends Display {
}
}
+ public static void initSingleton() {
+ // just exist to ensure static init has been run
+ }
+
public KDDisplay() {
}
diff --git a/src/newt/classes/com/sun/javafx/newt/windows/WindowsDisplay.java b/src/newt/classes/com/sun/javafx/newt/windows/WindowsDisplay.java
index 975281c95..80485ed67 100755
--- a/src/newt/classes/com/sun/javafx/newt/windows/WindowsDisplay.java
+++ b/src/newt/classes/com/sun/javafx/newt/windows/WindowsDisplay.java
@@ -45,15 +45,6 @@ public class WindowsDisplay extends Display {
private static long hInstance;
static {
- initSingleton();
- }
-
- private static volatile boolean isInit = false;
-
- public static synchronized void initSingleton() {
- if(isInit) return;
- isInit=true;
-
NativeLibLoader.loadNEWT();
if (!WindowsWindow.initIDs()) {
@@ -61,6 +52,10 @@ public class WindowsDisplay extends Display {
}
}
+ public static void initSingleton() {
+ // just exist to ensure static init has been run
+ }
+
public WindowsDisplay() {
}
diff --git a/src/newt/classes/com/sun/javafx/newt/x11/X11Display.java b/src/newt/classes/com/sun/javafx/newt/x11/X11Display.java
index 050b9b24d..5a2e0ad5d 100755
--- a/src/newt/classes/com/sun/javafx/newt/x11/X11Display.java
+++ b/src/newt/classes/com/sun/javafx/newt/x11/X11Display.java
@@ -41,15 +41,6 @@ import com.sun.nativewindow.impl.x11.X11Util;
public class X11Display extends Display {
static {
- initSingleton();
- }
-
- private static volatile boolean isInit = false;
-
- public static synchronized void initSingleton() {
- if(isInit) return;
- isInit=true;
-
NativeLibLoader.loadNEWT();
if (!initIDs()) {
@@ -61,6 +52,10 @@ public class X11Display extends Display {
}
}
+ public static void initSingleton() {
+ // just exist to ensure static init has been run
+ }
+
public X11Display() {
}