diff options
author | Sven Gothel <[email protected]> | 2020-01-06 18:20:09 +0100 |
---|---|---|
committer | Sven Gothel <[email protected]> | 2020-01-06 18:20:09 +0100 |
commit | 20921924e994e9f612a82009026081a4573b3bdd (patch) | |
tree | 9d9e41a190eda3ad9ed1b9c78c8622ff4540226c | |
parent | abbc95745b69dcd7f5f84c7a56bf32947c23e74d (diff) |
Bug 1421: Move Bug 1362 'setBackground(..)' fix before potential 'setNEWTChild(..)'
-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) { |