aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPaul Webster2011-12-19 13:38:48 -0500
committerPaul Webster2011-12-19 13:47:05 -0500
commit66f6b21a942c5178fe68faa948ade7596f535b56 (patch)
tree68ef044e81e1b934af57794f0d1cf29e311c300b
parentb5e377f52a1c0bfb4471a2985ed943df45c8904f (diff)
downloadeclipse.platform.ui-66f6b21a942c5178fe68faa948ade7596f535b56.zip
eclipse.platform.ui-66f6b21a942c5178fe68faa948ade7596f535b56.tar.gz
eclipse.platform.ui-66f6b21a942c5178fe68faa948ade7596f535b56.tar.xz
Bug 362545 - Workbench windows do not close with busy event queuev20111219-1847
bound the event queue with an asyncExec
-rw-r--r--bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/WorkbenchWindow.java9
1 files changed, 8 insertions, 1 deletions
diff --git a/bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/WorkbenchWindow.java b/bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/WorkbenchWindow.java
index 56b91d2..38019d7 100644
--- a/bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/WorkbenchWindow.java
+++ b/bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/WorkbenchWindow.java
@@ -842,7 +842,14 @@ public class WorkbenchWindow extends ApplicationWindow implements
// Ensure that any pending 'Close' event are flushed
// before opening any dialogs
- while (Display.getCurrent().readAndDispatch())
+ final boolean[] boundingAsynchDone = { false };
+ Display display = getShell().getDisplay();
+ display.asyncExec(new Runnable() {
+ public void run() {
+ boundingAsynchDone[0] = true;
+ }
+ });
+ while (!boundingAsynchDone[0] && display.readAndDispatch())
;
// let the advisor or other interested parties