aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorSven Gothel <[email protected]>2013-12-31 08:01:28 +0100
committerSven Gothel <[email protected]>2013-12-31 08:01:28 +0100
commite7032ae9ca4b754bd9737f86d9496211e9155db4 (patch)
tree244965b4e43d22473f308badbd8dbfd5a1d2683f /src
parent852fcbf1b8d87e35884082e792ff0ac6fdeed3a7 (diff)
NEWT Cleanup - Remove Type Casts and OSX Newt/Fmod Workaround (Early WindowImpl initialization)
Diffstat (limited to 'src')
-rw-r--r--src/newt/classes/com/jogamp/newt/Display.java2
-rw-r--r--src/newt/classes/com/jogamp/newt/NewtFactory.java17
-rw-r--r--src/newt/classes/jogamp/newt/WindowImpl.java16
3 files changed, 7 insertions, 28 deletions
diff --git a/src/newt/classes/com/jogamp/newt/Display.java b/src/newt/classes/com/jogamp/newt/Display.java
index a0a098481..4469189a8 100644
--- a/src/newt/classes/com/jogamp/newt/Display.java
+++ b/src/newt/classes/com/jogamp/newt/Display.java
@@ -222,7 +222,7 @@ public abstract class Display {
synchronized(displayList) {
int i = fromIndex >= 0 ? fromIndex : displayList.size() - 1 ;
while( ( incr > 0 ) ? i < displayList.size() : i >= 0 ) {
- final Display display = (Display) displayList.get(i).get();
+ final Display display = displayList.get(i).get();
if( null == display ) {
// Clear GC'ed dead reference entry!
displayList.remove(i);
diff --git a/src/newt/classes/com/jogamp/newt/NewtFactory.java b/src/newt/classes/com/jogamp/newt/NewtFactory.java
index 5ae3f3692..157e2bb3c 100644
--- a/src/newt/classes/com/jogamp/newt/NewtFactory.java
+++ b/src/newt/classes/com/jogamp/newt/NewtFactory.java
@@ -59,11 +59,6 @@ public class NewtFactory {
@Override
public Object run() {
NativeWindowFactory.initSingleton(); // last resort ..
-
- // Work-around for initialization order problems on Mac OS X
- // between native Newt and (apparently) Fmod
- WindowImpl.init(NativeWindowFactory.getNativeWindowType(true));
-
return null;
} } );
}
@@ -320,9 +315,9 @@ public class NewtFactory {
public static boolean isScreenCompatible(NativeWindow parent, Screen childScreen) {
// Get parent's NativeWindow details
- AbstractGraphicsConfiguration parentConfig = (AbstractGraphicsConfiguration) parent.getGraphicsConfiguration();
- AbstractGraphicsScreen parentScreen = (AbstractGraphicsScreen) parentConfig.getScreen();
- AbstractGraphicsDevice parentDevice = (AbstractGraphicsDevice) parentScreen.getDevice();
+ AbstractGraphicsConfiguration parentConfig = parent.getGraphicsConfiguration();
+ AbstractGraphicsScreen parentScreen = parentConfig.getScreen();
+ AbstractGraphicsDevice parentDevice = parentScreen.getDevice();
DisplayImpl childDisplay = (DisplayImpl) childScreen.getDisplay();
String parentDisplayName = childDisplay.validateDisplayName(null, parentDevice.getHandle());
@@ -343,9 +338,9 @@ public class NewtFactory {
public static Screen createCompatibleScreen(NativeWindow parent, Screen childScreen) {
// Get parent's NativeWindow details
- AbstractGraphicsConfiguration parentConfig = (AbstractGraphicsConfiguration) parent.getGraphicsConfiguration();
- AbstractGraphicsScreen parentScreen = (AbstractGraphicsScreen) parentConfig.getScreen();
- AbstractGraphicsDevice parentDevice = (AbstractGraphicsDevice) parentScreen.getDevice();
+ AbstractGraphicsConfiguration parentConfig = parent.getGraphicsConfiguration();
+ AbstractGraphicsScreen parentScreen = parentConfig.getScreen();
+ AbstractGraphicsDevice parentDevice = parentScreen.getDevice();
if(null != childScreen) {
// check if child Display/Screen is compatible already
diff --git a/src/newt/classes/jogamp/newt/WindowImpl.java b/src/newt/classes/jogamp/newt/WindowImpl.java
index d06eb3e25..7a7e69e48 100644
--- a/src/newt/classes/jogamp/newt/WindowImpl.java
+++ b/src/newt/classes/jogamp/newt/WindowImpl.java
@@ -255,22 +255,6 @@ public abstract class WindowImpl implements Window, NEWTEventConsumer
private ArrayList<WindowListener> windowListeners = new ArrayList<WindowListener>();
private boolean repaintQueued = false;
- /**
- * Workaround for initialization order problems on Mac OS X
- * between native Newt and (apparently) Fmod -- if Fmod is
- * initialized first then the connection to the window server
- * breaks, leading to errors from deep within the AppKit
- */
- public static void init(String type) {
- if (NativeWindowFactory.TYPE_MACOSX.equals(type)) {
- try {
- getWindowClass(type);
- } catch (Exception e) {
- e.printStackTrace();
- }
- }
- }
-
//
// Construction Methods
//