diff options
author | Silenio Quarti <silenio> | 2011-04-01 19:52:31 +0000 |
---|---|---|
committer | Silenio Quarti <silenio> | 2011-04-01 19:52:31 +0000 |
commit | 52c110b93169ca50cc17336de89321eb76b5f3d3 (patch) | |
tree | 624a8a7a9fdfe8cf9baf1cf53e014d1bb048c0c3 /bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/MessageBox.java | |
parent | ea1614638a2d49cacb0be9856960133527b7df52 (diff) | |
download | eclipse.platform.swt-52c110b93169ca50cc17336de89321eb76b5f3d3.tar.gz eclipse.platform.swt-52c110b93169ca50cc17336de89321eb76b5f3d3.tar.xz eclipse.platform.swt-52c110b93169ca50cc17336de89321eb76b5f3d3.zip |
Bug 341085 - swt tests timing out linux.gtk.x86 in N20110327-2000
Diffstat (limited to 'bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/MessageBox.java')
-rw-r--r-- | bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/MessageBox.java | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/MessageBox.java b/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/MessageBox.java index 2a74df669c..42fd41ed6f 100644 --- a/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/MessageBox.java +++ b/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/MessageBox.java @@ -188,6 +188,13 @@ public int open () { hookId = OS.g_signal_add_emission_hook (signalId, 0, display.emissionProc, handle, 0); } int response = OS.gtk_dialog_run (handle); + /* + * This call to gdk_threads_leave() is a temporary work around + * to avoid deadlocks when gdk_threads_init() is called by native + * code outside of SWT (i.e AWT, etc). It ensures that the current + * thread leaves the GTK lock acquired by the function above. + */ + OS.gdk_threads_leave(); if ((style & SWT.RIGHT_TO_LEFT) != 0) { OS.g_signal_remove_emission_hook (signalId, hookId); } |