Login  Register

Linux + Java 7 + Dual screen issue

Posted by lrenard on Dec 12, 2013; 8:54am
URL: https://forum.jogamp.org/Linux-Java-7-Dual-screen-issue-tp4030862.html

Hi all,

I have performed some test on a bug we discovered more than a year ago.
See this link : https://forums.oracle.com/thread/2438029

I have tested again today on jogl-demos (JRefract v2.1.2 for example) and when I move the main frame from one screen to another, the application stops working.

During my test on jogl 1.1.1a I have seen that modifying the canvas peer to use a proxy pattern with the following modification on updateGraphicsData method solved the issue (the variable peer is the original peer of the canvas).
public boolean updateGraphicsData(GraphicsConfiguration gc) {
               
                X11GraphicsConfig oldGC = (X11GraphicsConfig)getGraphicsConfiguration();
                X11GraphicsConfig newGC = (X11GraphicsConfig) gc;
// boolean update = peer.updateGraphicsData(gc);
                boolean update = peer.updateGraphicsData(X11GraphicsConfig.getConfig((X11GraphicsDevice) gc.getDevice(),oldGC.getVisual() , ((X11GraphicsConfig) gc).getDepth(), ((X11GraphicsConfig) gc).getColormap(),((X11GraphicsConfig) gc).isDoubleBuffered()));
                return update;
}

However, I am not expert enough to know what consequences this modifications could have elsewhere in the code.
We need to be able to provide our client a working version even if the bug is not officially fixed. (The main issue is in the JVM itself but the resolution won't be available soon we think)

Is there someone who has faced the same issue and is there any "nice" solution.

Thanks