6809233: Modal dialog blocks calling thread after it is hidden and disposed

Send WakingRunnable to toolkit to prevent early cleanup.

Reviewed-by: art, son
This commit is contained in:
Roman Kennke 2009-03-24 21:57:50 +01:00
parent cd71edadc5
commit 1a0a9da570

View File

@ -1226,7 +1226,7 @@ public class Dialog extends Window {
synchronized (getTreeLock()) { synchronized (getTreeLock()) {
if (keepBlockingEDT) { if (keepBlockingEDT) {
keepBlockingEDT = false; keepBlockingEDT = false;
PeerEvent wakingEvent = new PeerEvent(this, new WakingRunnable(), PeerEvent.PRIORITY_EVENT); PeerEvent wakingEvent = new PeerEvent(getToolkit(), new WakingRunnable(), PeerEvent.PRIORITY_EVENT);
AppContext curAppContext = AppContext.getAppContext(); AppContext curAppContext = AppContext.getAppContext();
if (showAppContext != curAppContext) { if (showAppContext != curAppContext) {
// Wake up event dispatch thread on which the dialog was // Wake up event dispatch thread on which the dialog was