diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/newt/classes/com/jogamp/newt/swt/NewtCanvasSWT.java | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/newt/classes/com/jogamp/newt/swt/NewtCanvasSWT.java b/src/newt/classes/com/jogamp/newt/swt/NewtCanvasSWT.java index 117c1ca47..685eccb43 100644 --- a/src/newt/classes/com/jogamp/newt/swt/NewtCanvasSWT.java +++ b/src/newt/classes/com/jogamp/newt/swt/NewtCanvasSWT.java @@ -145,6 +145,10 @@ public class NewtCanvasSWT extends Canvas implements NativeWindowHolder, WindowC screen = SWTAccessor.getScreen(device, -1 /* default */); nativeWindow = 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)); + if(null != child) { setNEWTChild(child); } @@ -158,10 +162,6 @@ public class NewtCanvasSWT extends Canvas implements NativeWindowHolder, WindowC " - surfaceHandle 0x"+Long.toHexString(nsh)); } - // 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) { |