aboutsummaryrefslogtreecommitdiffstats
path: root/src/nativewindow
diff options
context:
space:
mode:
Diffstat (limited to 'src/nativewindow')
-rw-r--r--src/nativewindow/classes/com/jogamp/nativewindow/GenericUpstreamSurfacelessHook.java (renamed from src/nativewindow/classes/jogamp/nativewindow/x11/X11UpstreamSurfacelessHook.java)16
1 files changed, 6 insertions, 10 deletions
diff --git a/src/nativewindow/classes/jogamp/nativewindow/x11/X11UpstreamSurfacelessHook.java b/src/nativewindow/classes/com/jogamp/nativewindow/GenericUpstreamSurfacelessHook.java
index 4461f7691..3fd5ad902 100644
--- a/src/nativewindow/classes/jogamp/nativewindow/x11/X11UpstreamSurfacelessHook.java
+++ b/src/nativewindow/classes/com/jogamp/nativewindow/GenericUpstreamSurfacelessHook.java
@@ -25,18 +25,16 @@
* authors and should not be interpreted as representing official policies, either expressed
* or implied, of JogAmp Community.
*/
-package jogamp.nativewindow.x11;
+package com.jogamp.nativewindow;
+import javax.media.nativewindow.AbstractGraphicsDevice;
import javax.media.nativewindow.NativeSurface;
import javax.media.nativewindow.ProxySurface;
import javax.media.nativewindow.UpstreamSurfaceHook;
import com.jogamp.nativewindow.UpstreamSurfaceHookMutableSize;
-import com.jogamp.nativewindow.x11.X11GraphicsConfiguration;
-import com.jogamp.nativewindow.x11.X11GraphicsDevice;
-import com.jogamp.nativewindow.x11.X11GraphicsScreen;
-public class X11UpstreamSurfacelessHook extends UpstreamSurfaceHookMutableSize {
+public class GenericUpstreamSurfacelessHook extends UpstreamSurfaceHookMutableSize {
/**
* @param width the initial width as returned by {@link NativeSurface#getSurfaceWidth()} via {@link UpstreamSurfaceHook#getSurfaceWidth(ProxySurface)},
* not the actual dummy surface width.
@@ -45,15 +43,13 @@ public class X11UpstreamSurfacelessHook extends UpstreamSurfaceHookMutableSize {
* not the actual dummy surface height,
* The latter is platform specific and small
*/
- public X11UpstreamSurfacelessHook(final int width, final int height) {
+ public GenericUpstreamSurfacelessHook(final int width, final int height) {
super(width, height);
}
@Override
public final void create(final ProxySurface s) {
- final X11GraphicsConfiguration cfg = (X11GraphicsConfiguration) s.getGraphicsConfiguration();
- final X11GraphicsScreen screen = (X11GraphicsScreen) cfg.getScreen();
- final X11GraphicsDevice device = (X11GraphicsDevice) screen.getDevice();
+ final AbstractGraphicsDevice device = s.getGraphicsConfiguration().getScreen().getDevice();
device.lock();
try {
if(0 == device.getHandle()) {
@@ -74,7 +70,7 @@ public class X11UpstreamSurfacelessHook extends UpstreamSurfaceHookMutableSize {
@Override
public final void destroy(final ProxySurface s) {
if( s.containsUpstreamOptionBits( ProxySurface.OPT_PROXY_OWNS_UPSTREAM_SURFACE ) ) {
- final X11GraphicsDevice device = (X11GraphicsDevice) s.getGraphicsConfiguration().getScreen().getDevice();
+ final AbstractGraphicsDevice device = s.getGraphicsConfiguration().getScreen().getDevice();
if( !s.containsUpstreamOptionBits( ProxySurface.OPT_UPSTREAM_SURFACELESS ) ) {
throw new InternalError("Owns upstream surface, but not a valid zero surface: "+s);
}