Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTill Brychcy2017-09-19 15:03:24 -0400
committerTill Brychcy2017-11-03 09:08:22 -0400
commit66f6b0d0291d3170012607e008235a5e1f3eb8bc (patch)
treed1caa860a92889e5cc7c78ae8ae8b82bbf825a8b
parent627c118f2d37dbe61e2126052b09e16a083c3061 (diff)
downloadrt.equinox.framework-66f6b0d0291d3170012607e008235a5e1f3eb8bc.tar.gz
rt.equinox.framework-66f6b0d0291d3170012607e008235a5e1f3eb8bc.tar.xz
rt.equinox.framework-66f6b0d0291d3170012607e008235a5e1f3eb8bc.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>
-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