diff options
| author | Markus Keller | 2016-05-23 18:29:21 +0000 |
|---|---|---|
| committer | Markus Keller | 2016-05-25 16:30:19 +0000 |
| commit | 97bc6d06ebf7817e9b6aa794dd0f36e41b77181e (patch) | |
| tree | f8c96d14817f6b67d5ce899ddcd2db4fb160aab0 | |
| parent | 83f68458d1ae8ca986e87c6cf49dcb5c4bf9ba65 (diff) | |
| download | eclipse.platform.swt-97bc6d06ebf7817e9b6aa794dd0f36e41b77181e.tar.gz eclipse.platform.swt-97bc6d06ebf7817e9b6aa794dd0f36e41b77181e.tar.xz eclipse.platform.swt-97bc6d06ebf7817e9b6aa794dd0f36e41b77181e.zip | |
Bug 478975: [Cocoa][10.11] Can not run Eclipse in full screen mode without it hanging
Change-Id: Idd37fd6115063d379708512383b614e293a46e44
| -rw-r--r-- | bundles/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/widgets/Shell.java | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/bundles/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/widgets/Shell.java b/bundles/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/widgets/Shell.java index ec6a9fc8f9..68cf89d488 100644 --- a/bundles/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/widgets/Shell.java +++ b/bundles/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/widgets/Shell.java @@ -2137,6 +2137,25 @@ void updateParent (boolean visible) { */ if ((style & SWT.ON_TOP) != 0) { window.setLevel(OS.NSStatusWindowLevel); + } else if (OS.VERSION_MMB >= OS.VERSION_MMB(10, 11, 0)) { + /* + * Feature in Cocoa on 10.11: Second-level child windows of + * a full-screen window are sometimes shown behind their + * parent window, although they take keyboard focus. + * + * The exact circumstances are unknown. Could only be + * reproduced when the app was launched with the Eclipse + * launcher. This hack is a workaround for + * https://bugs.eclipse.org/478975 . + */ + Shell parentShell = (Shell) parent; + while (parentShell.parent != null) { + parentShell = (Shell) parentShell.parent; + if (parentShell._getFullScreen()) { + window.setLevel(OS.NSSubmenuWindowLevel); + break; + } + } } } } else { |
