summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/newt/classes/jogamp/newt/DisplayImpl.java3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/newt/classes/jogamp/newt/DisplayImpl.java b/src/newt/classes/jogamp/newt/DisplayImpl.java
index 83f4ca47c..6f448f9a6 100644
--- a/src/newt/classes/jogamp/newt/DisplayImpl.java
+++ b/src/newt/classes/jogamp/newt/DisplayImpl.java
@@ -408,6 +408,9 @@ public abstract class DisplayImpl extends Display {
}
return;
}
+ // can't wait if we are on EDT
+ wait = wait && !edtUtil.isCurrentThreadEDT();
+
Object lock = new Object();
NEWTEventTask eTask = new NEWTEventTask(e, wait?lock:null);
synchronized(lock) {