Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorXi Yan2018-06-13 19:28:41 +0000
committerEric Williams2018-06-15 14:47:16 +0000
commit3a449ba573dc88c6875f0f7ccd6b3a19476b0468 (patch)
tree34caa3fa0ed8f8a8881858bf5dcf55e16040cc1c /bundles
parent8e5f991ec961e162dce01a4fa003dcd58eddc0b2 (diff)
downloadeclipse.platform.swt-3a449ba573dc88c6875f0f7ccd6b3a19476b0468.tar.gz
eclipse.platform.swt-3a449ba573dc88c6875f0f7ccd6b3a19476b0468.tar.xz
eclipse.platform.swt-3a449ba573dc88c6875f0f7ccd6b3a19476b0468.zip
Bug 209975 - On GTK PopupList throws an exception while open if the
parent window closes. PopupList also fails to gain focus on open. Allow PopupList to take focus when it is opened in the FocusListener of a different widget. Change-Id: I44b297e091527b8439e867be5150e1572900421d Signed-off-by: Xi Yan <xixiyan@redhat.com>
Diffstat (limited to 'bundles')
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Shell.java6
1 files changed, 6 insertions, 0 deletions
diff --git a/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Shell.java b/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Shell.java
index 01d89b3dbf..21b518afd4 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Shell.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Shell.java
@@ -1731,6 +1731,12 @@ public void open () {
}
}
if (!restored) {
+ /* If a shell is opened during the FocusOut event of a widget,
+ * it is required to set focus to all shells except for ON_TOP
+ * shells in order to maintain consistency with other platforms.
+ */
+ if ((style & SWT.ON_TOP) == 0) display.focusEvent = SWT.None;
+
if (defaultButton != null && !defaultButton.isDisposed ()) {
defaultButton.setFocus ();
} else {

Back to the top