Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-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