When creating a GLCanvas in SWT or an AWT GLCanvas wrapped in a SWT_AWT created Frame, resizing the window causes the 3D contents to flicker between the original size and the full size and the components' background color. Also, if I move the SWT Shell to my secondary display and full screen it, a "JavaEmbeddedFrame" is created on my primary display containing the 3D canvas (which still flickers).
I have Ubuntu 13.04 with an AMD Radeon 7970 GHz edition and a co-worker that uses Ubuntu 12.04 with an nVidia card. We are both having the same issues. Another co-worker with debian has no issues. No issues on our Windows machines, either. I have fglrx-updates version 9.012 installed and have tested the test program with Java 6 and 7.
I wrote up a small test case using just jogl, swt, and java (none of our jogl-based libraries) as well as tested the swt.GLCanvas variant (same issues). Included is the SWT version I'm using (I've also tried 3.7) as well as the JOGL version (just downloaded). It's an eclipse project so you should be able to import it directly (libraries might need updating in the build path settings if you're not using x64 linux).
I get this output when application starts
libEGL warning: DRI2: failed to authenticate
when I fullscreen it on my secondary monitor
(SWT:10897): Gtk-CRITICAL **: IA__gtk_widget_set_size_request: assertion `GTK_IS_WIDGET (widget)' failed"
when I close the swt Shell and dispose of the display
(SWT:11308): GLib-GObject-CRITICAL **: g_object_get_qdata: assertion `G_IS_OBJECT (object)' failed
X11Util.Display: Shutdown (JVM shutdown: true, open (no close attempt): 1/1, reusable (open, marked uncloseable): 2, pending (open in creation order): 3)
X11Util: Open X11 Display Connections: 1
X11Util: Open: NamedX11Display[:0, 0x7fe12c646ad0, refCount 1, unCloseable true]
X11Util.closePendingDisplayConnections(): Closed 3 pending display connections
At one point I received the following stack trace; I can't seem to reproduce it, though
Caused by: javax.media.nativewindow.NativeWindowException: Unable to lock surface
at java.security.AccessController.doPrivileged(Native Method)
Created attachment 468 [details]
JOGL-SWT Test Application
I had to remove the libaries from the zip (it was too large) so if you grab the SWT library (I used 4.2.2; the current version) and JOGL libraries (current release version) and update the build path in the eclpse project it shouldn't have too much trouble.
Also, just to be clear; I do work on a multi-display system with two monitors (30" Dell's @2560x1600). Not sure if it is part of the issue but just in case.
It seems to come from a problem between GTK and SWT, that's why you don't reproduce this bug under Windows. I thought a similar bug here:
There seems to be a problem with the way SWT handles multiple monitors.
No more reproducible and as Julien pointed out in comment 3,
probably and issue in the other modules (SWT etc).