summaryrefslogtreecommitdiffstats
path: root/src/test/com
diff options
context:
space:
mode:
Diffstat (limited to 'src/test/com')
-rw-r--r--src/test/com/jogamp/opengl/test/junit/jogl/swt/TestSWTAccessor02NewtGLWindow.java14
1 files changed, 2 insertions, 12 deletions
diff --git a/src/test/com/jogamp/opengl/test/junit/jogl/swt/TestSWTAccessor02NewtGLWindow.java b/src/test/com/jogamp/opengl/test/junit/jogl/swt/TestSWTAccessor02NewtGLWindow.java
index dafd8f07a..6694df65a 100644
--- a/src/test/com/jogamp/opengl/test/junit/jogl/swt/TestSWTAccessor02NewtGLWindow.java
+++ b/src/test/com/jogamp/opengl/test/junit/jogl/swt/TestSWTAccessor02NewtGLWindow.java
@@ -160,19 +160,9 @@ public class TestSWTAccessor02NewtGLWindow extends UITestCase {
SWTAccessor.invoke(true, new Runnable() {
public void run() {
canvas[0] = new Canvas (composite, SWT.NO_BACKGROUND);
- // Bug 1362 fix or workaround: Seems GTK3 at least performs lazy initialization
- // Minimal action required: setBackground + fillRectangle of some space in canvas ONCE before reparenting!
- final boolean paintedOnce[] = { false };
+ // Bug 1362 fix or workaround: Seems SWT/GTK3 at least performs lazy initialization
+ // Minimal action required: setBackground of the parent canvas before reparenting!
canvas[0].setBackground(new Color(display, 255, 255, 255));
- canvas[0].addPaintListener (new PaintListener() {
- public void paintControl(final PaintEvent e) {
- if( !paintedOnce[0] ) {
- paintedOnce[0] = true;
- final Rectangle r = canvas[0].getClientArea();
- e.gc.fillRectangle(0, 0, r.width, r.height);
- canvas[0].removePaintListener(this);
- }
- }});
shell.setText( getClass().getName() );
shell.setBounds( 0, 0, 700, 700 );
shell.open();