diff options
author | Sven Gothel <[email protected]> | 2011-11-25 00:20:06 +0100 |
---|---|---|
committer | Sven Gothel <[email protected]> | 2011-11-25 00:20:06 +0100 |
commit | a94c1a2945a31aa5d93e354da3bc80f59f253ec4 (patch) | |
tree | 8709f61d318f6224500fff77f0d74c4a38c75912 /src/newt/classes/jogamp | |
parent | c84e235b3284d0e18481748b44594116e25821a9 (diff) |
Nativewindow AWT Device/Screen: Cleanup construction [default, specific]; AWTDevice: Remove subtype
Diffstat (limited to 'src/newt/classes/jogamp')
-rw-r--r-- | src/newt/classes/jogamp/newt/driver/awt/AWTCanvas.java | 4 | ||||
-rw-r--r-- | src/newt/classes/jogamp/newt/driver/awt/AWTDisplay.java | 3 |
2 files changed, 4 insertions, 3 deletions
diff --git a/src/newt/classes/jogamp/newt/driver/awt/AWTCanvas.java b/src/newt/classes/jogamp/newt/driver/awt/AWTCanvas.java index 390d96fde..b63e433f6 100644 --- a/src/newt/classes/jogamp/newt/driver/awt/AWTCanvas.java +++ b/src/newt/classes/jogamp/newt/driver/awt/AWTCanvas.java @@ -246,7 +246,9 @@ public class AWTCanvas extends Canvas { CapabilitiesImmutable capsRequested, CapabilitiesChooser chooser, GraphicsDevice device) { - AbstractGraphicsScreen aScreen = AWTGraphicsScreen.createScreenDevice(device, AbstractGraphicsDevice.DEFAULT_UNIT); + final AbstractGraphicsScreen aScreen = null != device ? + AWTGraphicsScreen.createScreenDevice(device, AbstractGraphicsDevice.DEFAULT_UNIT): + AWTGraphicsScreen.createDefault(); AWTGraphicsConfiguration config = (AWTGraphicsConfiguration) GraphicsConfigurationFactory.getFactory(AWTGraphicsDevice.class).chooseGraphicsConfiguration(capsChosen, capsRequested, diff --git a/src/newt/classes/jogamp/newt/driver/awt/AWTDisplay.java b/src/newt/classes/jogamp/newt/driver/awt/AWTDisplay.java index 64c741464..f4ee5f2df 100644 --- a/src/newt/classes/jogamp/newt/driver/awt/AWTDisplay.java +++ b/src/newt/classes/jogamp/newt/driver/awt/AWTDisplay.java @@ -33,7 +33,6 @@ package jogamp.newt.driver.awt; -import javax.media.nativewindow.AbstractGraphicsDevice; import javax.media.nativewindow.awt.AWTGraphicsDevice; import com.jogamp.newt.NewtFactory; import jogamp.newt.DisplayImpl; @@ -43,7 +42,7 @@ public class AWTDisplay extends DisplayImpl { } protected void createNativeImpl() { - aDevice = (AWTGraphicsDevice) AWTGraphicsDevice.createDevice(null, AbstractGraphicsDevice.DEFAULT_UNIT); // default + aDevice = AWTGraphicsDevice.createDefault(); } protected void setAWTGraphicsDevice(AWTGraphicsDevice d) { |