summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorSven Gothel <[email protected]>2011-02-28 05:44:28 +0100
committerSven Gothel <[email protected]>2011-02-28 05:44:28 +0100
commit4c1e6d1bda0b8c4a9517f751e428deda6847a72c (patch)
tree4b4939e2d2849f2d4ffc72a9f544833521be69a6 /src
parent2a68b716d8b288812cb701ce0af1bd59cee5cca2 (diff)
NEWT: enqueueEvent(wait, ..) can't wait if on EDT. Solves UI close, etc
Diffstat (limited to 'src')
-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) {