aboutsummaryrefslogtreecommitdiffstats
path: root/src/newt/classes
diff options
context:
space:
mode:
Diffstat (limited to 'src/newt/classes')
-rw-r--r--src/newt/classes/com/jogamp/newt/Display.java8
-rw-r--r--src/newt/classes/com/jogamp/newt/swt/NewtCanvasSWT.java9
2 files changed, 15 insertions, 2 deletions
diff --git a/src/newt/classes/com/jogamp/newt/Display.java b/src/newt/classes/com/jogamp/newt/Display.java
index 391bccf3d..de1d58068 100644
--- a/src/newt/classes/com/jogamp/newt/Display.java
+++ b/src/newt/classes/com/jogamp/newt/Display.java
@@ -164,6 +164,14 @@ public abstract class Display {
* If <code>newEDTUtil</code> is not null and equals the previous one,
* <code>null</code> is returned and no change is being made.
* </p>
+ * <p>
+ * Note that <code>newEDTUtil</code> 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:
+ * <pre>
+ * newEDTUtil.invoke(true, new Runnable() { public void run() { } } );
+ * </pre>
+ * </p>
*/
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);