diff options
author | Praveen Innamuri <pinnamuri> | 2010-05-07 03:09:32 +0000 |
---|---|---|
committer | Praveen Innamuri <pinnamuri> | 2010-05-07 03:09:32 +0000 |
commit | 2f4d1b2421c0beaef45f0224c0a7c70952862a33 (patch) | |
tree | 033b347cf8b66fa6dd432445a11d65ce07577f6c /bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/MessageBox.java | |
parent | 98e192d43291fda4fd3ef0ea1b9ac46736826b70 (diff) | |
download | eclipse.platform.swt-2f4d1b2421c0beaef45f0224c0a7c70952862a33.tar.gz eclipse.platform.swt-2f4d1b2421c0beaef45f0224c0a7c70952862a33.tar.xz eclipse.platform.swt-2f4d1b2421c0beaef45f0224c0a7c70952862a33.zip |
288669 - Modal state of Shells ignored after a dialog has popped up
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 | 10 |
1 files changed, 10 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 3d1cfd10e4..606101cde2 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 @@ -167,6 +167,16 @@ public int open () { OS.gtk_window_set_title(handle,buffer); display.addIdleProc (); Dialog oldModal = null; + /* + * In order to allow the dialog to be modal of it's + * parent shells, it is required to assign the + * dialog to the same window group as of the shells. + */ + if (OS.GTK_VERSION >= OS.VERSION (2, 10, 0)) { + int /*long*/ group = OS.gtk_window_get_group(0); + OS.gtk_window_group_add_window (group, handle); + } + if (OS.gtk_window_get_modal (handle)) { oldModal = display.getModalDialog (); display.setModalDialog (this); |