39863
diff --git a/bundles/org.eclipse.swt/Eclipse SWT/carbon/org/eclipse/swt/widgets/Display.java b/bundles/org.eclipse.swt/Eclipse SWT/carbon/org/eclipse/swt/widgets/Display.java
index 42c0b4d..d4ed737 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT/carbon/org/eclipse/swt/widgets/Display.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT/carbon/org/eclipse/swt/widgets/Display.java
@@ -1272,13 +1272,15 @@
*/
public Control getFocusControl () {
checkDevice ();
+ if (focusControl != null && !focusControl.isDisposed ()) {
+ return focusControl;
+ }
int theWindow = OS.GetUserFocusWindow ();
if (theWindow == 0) return null;
return getFocusControl (theWindow);
}
Control getFocusControl (int window) {
- if (focusControl != null) return focusControl;
int [] theControl = new int [1];
OS.GetKeyboardFocus (window, theControl);
if (theControl [0] == 0) return null;