Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTill Brychcy2017-09-19 15:03:24 -0400
committerSravan Kumar Lakkimsetti2017-09-21 05:03:32 -0400
commit007ec60896077b3ef8bb59da9db5fecc3f9fc878 (patch)
treeab71607a9b8fa013a27f17965097f753af7fd8cf /features
parent9b40624f65388e4ba94b1f0645bdb456505b2d76 (diff)
downloadrt.equinox.framework-007ec60896077b3ef8bb59da9db5fecc3f9fc878.tar.gz
rt.equinox.framework-007ec60896077b3ef8bb59da9db5fecc3f9fc878.tar.xz
rt.equinox.framework-007ec60896077b3ef8bb59da9db5fecc3f9fc878.zip
Bug 457921 - [RCP] RCP application menu not shown when launched from
Eclipse on OS X 10.9 Change-Id: Ie9b23c0f7c80c0b3c80b5fd41a18d61a54e392eb Signed-off-by: Till Brychcy <register.eclipse@brychcy.de>
Diffstat (limited to 'features')
-rw-r--r--features/org.eclipse.equinox.executable.feature/library/cocoa/eclipseCocoa.c7
-rw-r--r--features/org.eclipse.equinox.executable.feature/library/cocoa/eclipseCocoaCommon.c8
2 files changed, 4 insertions, 11 deletions
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 023223103..6e6215d2d 100644
--- a/features/org.eclipse.equinox.executable.feature/library/cocoa/eclipseCocoa.c
+++ b/features/org.eclipse.equinox.executable.feature/library/cocoa/eclipseCocoa.c
@@ -97,11 +97,8 @@ static NSWindow* window = nil;
}
+ (int)show: (NSString *) featureImage {
- ProcessSerialNumber psn;
- if (GetCurrentProcess(&psn) == noErr) {
- TransformProcessType(&psn, kProcessTransformToForegroundApplication);
- SetFrontProcess(&psn);
- }
+ [[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 1794dc44b..04bf97ff6 100644
--- a/features/org.eclipse.equinox.executable.feature/library/cocoa/eclipseCocoaCommon.c
+++ b/features/org.eclipse.equinox.executable.feature/library/cocoa/eclipseCocoaCommon.c
@@ -30,12 +30,8 @@ int initialized = 0;
static void init() {
if (!initialized) {
- ProcessSerialNumber psn;
- if (GetCurrentProcess(&psn) == noErr) {
- TransformProcessType(&psn, kProcessTransformToForegroundApplication);
- SetFrontProcess(&psn);
- }
- [NSApplication sharedApplication];
+ [[NSApplication sharedApplication] setActivationPolicy: NSApplicationActivationPolicyRegular];
+ [[NSRunningApplication currentApplication] activateWithOptions: NSApplicationActivateIgnoringOtherApps];
initialized= true;
}
}

Back to the top