aboutsummaryrefslogtreecommitdiffstats
path: root/src/jogl/classes/com/jogamp
diff options
context:
space:
mode:
Diffstat (limited to 'src/jogl/classes/com/jogamp')
-rw-r--r--src/jogl/classes/com/jogamp/opengl/swt/GLCanvas.java5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/jogl/classes/com/jogamp/opengl/swt/GLCanvas.java b/src/jogl/classes/com/jogamp/opengl/swt/GLCanvas.java
index 58b5bbcb9..a34c8648a 100644
--- a/src/jogl/classes/com/jogamp/opengl/swt/GLCanvas.java
+++ b/src/jogl/classes/com/jogamp/opengl/swt/GLCanvas.java
@@ -62,6 +62,7 @@ import jogamp.opengl.GLDrawableHelper;
import jogamp.opengl.GLDrawableImpl;
import org.eclipse.swt.SWT;
+import org.eclipse.swt.graphics.Color;
import org.eclipse.swt.graphics.Rectangle;
import org.eclipse.swt.layout.FillLayout;
import org.eclipse.swt.widgets.Canvas;
@@ -381,6 +382,10 @@ public class GLCanvas extends Canvas implements GLAutoDrawable, GLSharedContextS
drawable = null;
context = null;
+ // Bug 1362 fix or workaround: Seems SWT/GTK3 at least performs lazy initialization
+ // Minimal action required: setBackground of the parent canvas before reparenting!
+ setBackground(new Color(parent.getDisplay(), 255, 255, 255));
+
final Listener listener = new Listener () {
@Override
public void handleEvent (final Event event) {