diff options
author | Till Brychcy | 2017-09-19 19:03:24 +0000 |
---|---|---|
committer | Sravan Kumar Lakkimsetti | 2017-09-21 09:03:32 +0000 |
commit | 007ec60896077b3ef8bb59da9db5fecc3f9fc878 (patch) | |
tree | ab71607a9b8fa013a27f17965097f753af7fd8cf /features/org.eclipse.equinox.executable.feature/library | |
parent | 9b40624f65388e4ba94b1f0645bdb456505b2d76 (diff) | |
download | rt.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/org.eclipse.equinox.executable.feature/library')
-rw-r--r-- | features/org.eclipse.equinox.executable.feature/library/cocoa/eclipseCocoa.c | 7 | ||||
-rw-r--r-- | features/org.eclipse.equinox.executable.feature/library/cocoa/eclipseCocoaCommon.c | 8 |
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; } } |