maximizing GLCanvas on linux

Hello,

I’m having problems maximizing a GLCanvas in Linux. When I try to do so, my gui blocks (I mean, the pc doesn’t react on my keyboard, my mousepointer still moves but there is no reaktion on mouseclicks).
I’m working on linux

Run the jstack tool from the JDK against the PID of your java process. You will likely find a deadlock.

When the gui blocks, I mean that the only thing I can do is to shut down the pc (exept for my mousepointer, I can still move that). So, there is no way I can run jstack when I am experiencing that problem.


import javax.swing.*;
import javax.media.opengl.*;

public class Test{
	JFrame frame = new JFrame("test");
	GLCanvas canvas = new GLCanvas();

	public static void main (String args[]) {
		new Test();
	}

	public Test(){
		frame.setSize(100, 100);

		frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);

		frame.add(canvas);

		frame.pack();
		frame.setVisible(true);
	}
}


can you post your resize method and some info about what you are doing in initGL?

This is alI have, just a GLCanvas added to a JFrame.
No GLEventListener attached. So no reshape, init display…

This sounds like either a video driver or X server bug. User programs should not be able to completely kill the graphics system.

You might try logging in remotely from another machine to try to get a thread dump of the Java process when this happens

I haven’t had much time to figure it ou but I noticed that this only seems to happen with windowmanager xfwm4, this is the default WM for (desktop environement) xfce4 (linux), so it’s probabely a bug in that manager.

Pack and setVisible aren’t supposed to be called outside of the event dispatch thread. Maybe put those two lines in an invokeLater.