From 4c1e6d1bda0b8c4a9517f751e428deda6847a72c Mon Sep 17 00:00:00 2001 From: Sven Gothel Date: Mon, 28 Feb 2011 05:44:28 +0100 Subject: NEWT: enqueueEvent(wait, ..) can't wait if on EDT. Solves UI close, etc --- src/newt/classes/jogamp/newt/DisplayImpl.java | 3 +++ 1 file changed, 3 insertions(+) (limited to 'src') 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) { -- cgit v1.2.3