diff options
author | Alex Blewitt | 2021-02-06 19:57:43 +0000 |
---|---|---|
committer | Sravan Kumar Lakkimsetti | 2021-02-09 15:37:26 +0000 |
commit | cf46dda89155f53d2a14b300122479d3f3b6fb3d (patch) | |
tree | 7767f2bd826cbead9d46223a629cc68401e1a8ae | |
parent | fd10234f845386210e0d9da7b8b29fb68c20f2a6 (diff) | |
download | rt.equinox.framework-cf46dda89155f53d2a14b300122479d3f3b6fb3d.tar.gz rt.equinox.framework-cf46dda89155f53d2a14b300122479d3f3b6fb3d.tar.xz rt.equinox.framework-cf46dda89155f53d2a14b300122479d3f3b6fb3d.zip |
Bug 570428 - macOS menu not clickable at launch
When running on macOS, calling the `setActivationPolicy` or
`activateWithOptions` methods on the `NSApplication` causes the menu
system to be frozen, requiring navigating away from the app and back in
again to restore.
These have been moved into the SWT's Application Delegate callback
handler for when the application has launched, which fixes the problem.
This is no longer needed in the launcher either, and showing both the
splash screen and the dialog box works as before.
Removing these calls from the launcher allows Eclipse to be launched and
have clickable menus immediately without needing to move away.
See also Bug 552063 which fixed this in SWT.
Change-Id: I6d1292b76c1a91f794ba2634e643978f5d9e5c2f
Signed-off-by: Alex Blewitt <alex.blewitt@gmail.com>
3 files changed, 0 insertions, 18 deletions
diff --git a/features/org.eclipse.equinox.executable.feature/library/cocoa/build.sh b/features/org.eclipse.equinox.executable.feature/library/cocoa/build.sh index c457ba75a..c457ba75a 100644..100755 --- a/features/org.eclipse.equinox.executable.feature/library/cocoa/build.sh +++ b/features/org.eclipse.equinox.executable.feature/library/cocoa/build.sh diff --git a/features/org.eclipse.equinox.executable.feature/library/cocoa/eclipseCocoa.c b/features/org.eclipse.equinox.executable.feature/library/cocoa/eclipseCocoa.c index cc8e9c100..e93adb197 100644 --- a/features/org.eclipse.equinox.executable.feature/library/cocoa/eclipseCocoa.c +++ b/features/org.eclipse.equinox.executable.feature/library/cocoa/eclipseCocoa.c @@ -100,8 +100,6 @@ static NSWindow* window = nil; } + (int)show: (NSString *) featureImage { - [[NSApplication sharedApplication] setActivationPolicy: NSApplicationActivationPolicyRegular]; - [[NSRunningApplication currentApplication] activateWithOptions: NSApplicationActivateIgnoringOtherApps]; if (window != NULL) return 0; /*already showing */ if (featureImage == NULL) diff --git a/features/org.eclipse.equinox.executable.feature/library/cocoa/eclipseCocoaCommon.c b/features/org.eclipse.equinox.executable.feature/library/cocoa/eclipseCocoaCommon.c index 91fb2cb98..34aadbaf2 100644 --- a/features/org.eclipse.equinox.executable.feature/library/cocoa/eclipseCocoaCommon.c +++ b/features/org.eclipse.equinox.executable.feature/library/cocoa/eclipseCocoaCommon.c @@ -29,17 +29,6 @@ char pathSeparator = ':'; static CFBundleRef javaVMBundle = NULL; -int initialized = 0; - -static void init() { - if (!initialized) { - [[NSApplication sharedApplication] setActivationPolicy: NSApplicationActivationPolicyRegular]; - [[NSRunningApplication currentApplication] activateWithOptions: NSApplicationActivateIgnoringOtherApps]; - initialized= true; - } -} - - /* Initialize Window System * * Initialize Cocoa. @@ -51,9 +40,6 @@ int initWindowSystem( int* pArgc, char* argv[], int showSplash ) if (homeDir != NULL) chdir(homeDir); - if (showSplash) - init(); - return 0; } @@ -79,8 +65,6 @@ void displayMessage(char *title, char *message) inError= CFStringCreateWithCString(kCFAllocatorDefault, message, kCFStringEncodingUTF8); } - init(); - NSAutoreleasePool* pool = [[NSAutoreleasePool alloc] init]; NSAlert* alert = [NSAlert alertWithMessageText: (NSString*)(inDescription != nil ? inError : nil) defaultButton: nil alternateButton: nil otherButton: nil informativeTextWithFormat: (NSString*)(inDescription != nil ? inDescription : inError)]; [[alert window] setTitle: [NSString stringWithUTF8String: title]]; |