From bafd9b99816f55c105230a59211caf13f0315910 Mon Sep 17 00:00:00 2001
From: Sven Gothel <sgothel@jausoft.com>
Date: Wed, 23 Nov 2011 07:44:42 +0100
Subject: NativeSurface's getGraphicsConfiguration() returns the native
 (delegated) AbstractGraphicsConfiguration, if delegation is used.

This change restricts the usage of AbstractGraphicsConfiguration's getNativeGraphicsConfiguration()
to NativeSurface implementations and hence reduces complexity.

NativeSurface implementations are adapted and access to it's AbstractGraphicsConfiguration
is controlled via get/set method avoiding flawed usage (read/write), since read access shall
return the delegated AbstractGraphicsConfiguration, if used.
---
 src/jogl/classes/jogamp/opengl/x11/glx/X11GLXDrawableFactory.java | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

(limited to 'src/jogl/classes/jogamp/opengl/x11/glx/X11GLXDrawableFactory.java')

diff --git a/src/jogl/classes/jogamp/opengl/x11/glx/X11GLXDrawableFactory.java b/src/jogl/classes/jogamp/opengl/x11/glx/X11GLXDrawableFactory.java
index 28cff2629..63b2cff35 100644
--- a/src/jogl/classes/jogamp/opengl/x11/glx/X11GLXDrawableFactory.java
+++ b/src/jogl/classes/jogamp/opengl/x11/glx/X11GLXDrawableFactory.java
@@ -353,7 +353,7 @@ public class X11GLXDrawableFactory extends GLDrawableFactoryImpl {
     if (target == null) {
       throw new IllegalArgumentException("Null target");
     }
-    AbstractGraphicsConfiguration config = target.getGraphicsConfiguration().getNativeGraphicsConfiguration();
+    AbstractGraphicsConfiguration config = target.getGraphicsConfiguration();
     GLCapabilitiesImmutable caps = (GLCapabilitiesImmutable) config.getChosenCapabilities();
     if(!caps.isPBuffer()) {
         return new X11PixmapGLXDrawable(this, target);
-- 
cgit v1.2.3