From 84632ca22d112da45b807299d2b1f5e4f4107695 Mon Sep 17 00:00:00 2001
From: Sven Gothel newEDTUtil
is not null and equals the previous one,
* null
is returned and no change is being made.
*
+ * Note that newEDTUtil
will not be started if not done so already,
+ * to do so you may issue {@link EDTUtil#invoke(boolean, Runnable) invoke}
+ * on the new EDTUtil:
+ *
+ * newEDTUtil.invoke(true, new Runnable() { public void run() { } } ); + *+ * */ public abstract EDTUtil setEDTUtil(EDTUtil newEDTUtil); diff --git a/src/newt/classes/com/jogamp/newt/swt/NewtCanvasSWT.java b/src/newt/classes/com/jogamp/newt/swt/NewtCanvasSWT.java index 36bc3f28f..74611706a 100644 --- a/src/newt/classes/com/jogamp/newt/swt/NewtCanvasSWT.java +++ b/src/newt/classes/com/jogamp/newt/swt/NewtCanvasSWT.java @@ -325,8 +325,13 @@ public class NewtCanvasSWT extends Canvas implements WindowClosingProtocol { final int w = clientArea.width; final int h = clientArea.height; - final Display newtDisplay = newtChild.getScreen().getDisplay(); - newtDisplay.setEDTUtil(new SWTEDTUtil(newtDisplay, getDisplay())); + // set SWT EDT and start it + { + final Display newtDisplay = newtChild.getScreen().getDisplay(); + final EDTUtil edt = new SWTEDTUtil(newtDisplay, getDisplay()); + newtDisplay.setEDTUtil(edt); + edt.invoke(true, new Runnable() { public void run() { } } ); // start EDT + } newtChild.setSize(w, h); newtChild.reparentWindow(nativeWindow); -- cgit v1.2.3