diff options
Diffstat (limited to 'src/newt/classes/com/jogamp')
-rw-r--r-- | src/newt/classes/com/jogamp/newt/Display.java | 4 | ||||
-rw-r--r-- | src/newt/classes/com/jogamp/newt/Screen.java | 12 | ||||
-rw-r--r-- | src/newt/classes/com/jogamp/newt/awt/NewtCanvasAWT.java | 4 |
3 files changed, 17 insertions, 3 deletions
diff --git a/src/newt/classes/com/jogamp/newt/Display.java b/src/newt/classes/com/jogamp/newt/Display.java index de2f698c9..b6e33d619 100644 --- a/src/newt/classes/com/jogamp/newt/Display.java +++ b/src/newt/classes/com/jogamp/newt/Display.java @@ -105,6 +105,7 @@ public abstract class Display { * {@inheritDoc} * </p> */ + @Override boolean isGLOriented(); /** @@ -455,7 +456,8 @@ public abstract class Display { } public static String getThreadName() { - return Thread.currentThread().getName(); + final Thread ct = Thread.currentThread(); + return "Thread["+toHexString(ct.hashCode()) + ", " + ct.getName()+"]"; } public static String toHexString(final int hex) { diff --git a/src/newt/classes/com/jogamp/newt/Screen.java b/src/newt/classes/com/jogamp/newt/Screen.java index 4c4faef8d..c5c1ee230 100644 --- a/src/newt/classes/com/jogamp/newt/Screen.java +++ b/src/newt/classes/com/jogamp/newt/Screen.java @@ -245,6 +245,18 @@ public abstract class Screen { return monitors.get(0); } + public final MonitorDevice getFullyEnteredMonitor(final RectangleImmutable r) { + final List<MonitorDevice> monitors = getMonitorDevices(); + final int monitorCount = monitors.size(); + for(int i=0; i<monitorCount; i++) { + final MonitorDevice monitor = monitors.get(i); + if( !monitor.isClone() && monitor.getViewportInWindowUnits().contains(r) ) { + return monitor; + } + } + return null; + } + public final MonitorDevice getMonitorById(final int monitorId) { final List<MonitorDevice> monitors = getMonitorDevices(); final int monitorCount = monitors.size(); diff --git a/src/newt/classes/com/jogamp/newt/awt/NewtCanvasAWT.java b/src/newt/classes/com/jogamp/newt/awt/NewtCanvasAWT.java index ae692a2be..7ccab3336 100644 --- a/src/newt/classes/com/jogamp/newt/awt/NewtCanvasAWT.java +++ b/src/newt/classes/com/jogamp/newt/awt/NewtCanvasAWT.java @@ -29,7 +29,6 @@ package com.jogamp.newt.awt; -import java.applet.Applet; import java.awt.AWTKeyStroke; import java.awt.Component; import java.awt.EventQueue; @@ -458,11 +457,12 @@ public class NewtCanvasAWT extends java.awt.Canvas implements NativeWindowHolder /** See {@link #setSkipJAWTDestroy(boolean)}. */ public final boolean getSkipJAWTDestroy() { return skipJAWTDestroy; } + @SuppressWarnings("removal") private final void determineIfApplet() { isApplet = false; Component c = this; while(!isApplet && null != c) { - isApplet = c instanceof Applet; + isApplet = c instanceof java.applet.Applet; c = c.getParent(); } } |