Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLakshmi Shanmugam2017-09-29 01:58:52 -0400
committerLakshmi Shanmugam2017-09-29 02:16:38 -0400
commitef52d7ec57eab4ec68f49e66ffbf0698421fdb3c (patch)
treea848bdda202b0de38e32d222291c53ab5e879ab8 /bundles
parent1391d1e854f7ff317f836a800a7059ebc862d234 (diff)
downloadeclipse.platform.swt-ef52d7ec57eab4ec68f49e66ffbf0698421fdb3c.tar.gz
eclipse.platform.swt-ef52d7ec57eab4ec68f49e66ffbf0698421fdb3c.tar.xz
eclipse.platform.swt-ef52d7ec57eab4ec68f49e66ffbf0698421fdb3c.zip
Bug 521849: Fix deprecated warnings in Mac native build
SetFrontProcess is deprecated since 10.9. Remove it as the minimum supported mac OS version is 10.10 and is no longer required in Display class. Change-Id: I29862661233f12af5a1340a24b6b27e9ed87ea82
Diffstat (limited to 'bundles')
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT PI/cocoa/library/os.c16
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT PI/cocoa/library/os_stats.c1
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT PI/cocoa/library/os_stats.h1
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT PI/cocoa/org/eclipse/swt/internal/cocoa/OS.java2
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/widgets/Display.java3
5 files changed, 0 insertions, 23 deletions
diff --git a/bundles/org.eclipse.swt/Eclipse SWT PI/cocoa/library/os.c b/bundles/org.eclipse.swt/Eclipse SWT PI/cocoa/library/os.c
index 07aef59421..9b8da918ea 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT PI/cocoa/library/os.c
+++ b/bundles/org.eclipse.swt/Eclipse SWT PI/cocoa/library/os.c
@@ -5885,22 +5885,6 @@ JNIEXPORT void JNICALL OS_NATIVE(SectRgn)
}
#endif
-#ifndef NO_SetFrontProcess
-JNIEXPORT jint JNICALL OS_NATIVE(SetFrontProcess)
- (JNIEnv *env, jclass that, jintArray arg0)
-{
- jint *lparg0=NULL;
- jint rc = 0;
- OS_NATIVE_ENTER(env, that, SetFrontProcess_FUNC);
- if (arg0) if ((lparg0 = (*env)->GetIntArrayElements(env, arg0, NULL)) == NULL) goto fail;
- rc = (jint)SetFrontProcess((ProcessSerialNumber *)lparg0);
-fail:
- if (arg0 && lparg0) (*env)->ReleaseIntArrayElements(env, arg0, lparg0, 0);
- OS_NATIVE_EXIT(env, that, SetFrontProcess_FUNC);
- return rc;
-}
-#endif
-
#ifndef NO_SetRect
JNIEXPORT void JNICALL OS_NATIVE(SetRect)
(JNIEnv *env, jclass that, jshortArray arg0, jshort arg1, jshort arg2, jshort arg3, jshort arg4)
diff --git a/bundles/org.eclipse.swt/Eclipse SWT PI/cocoa/library/os_stats.c b/bundles/org.eclipse.swt/Eclipse SWT PI/cocoa/library/os_stats.c
index acc68b97f1..15f7e06465 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT PI/cocoa/library/os_stats.c
+++ b/bundles/org.eclipse.swt/Eclipse SWT PI/cocoa/library/os_stats.c
@@ -438,7 +438,6 @@ char * OS_nativeFunctionNames[] = {
"SecPolicySearchCreate",
"SecTrustCreateWithCertificates",
"SectRgn",
- "SetFrontProcess",
"SetRect",
"SetSystemUIMode",
"SetThemeCursor",
diff --git a/bundles/org.eclipse.swt/Eclipse SWT PI/cocoa/library/os_stats.h b/bundles/org.eclipse.swt/Eclipse SWT PI/cocoa/library/os_stats.h
index 5f4b5e9aba..daed6b5744 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT PI/cocoa/library/os_stats.h
+++ b/bundles/org.eclipse.swt/Eclipse SWT PI/cocoa/library/os_stats.h
@@ -448,7 +448,6 @@ typedef enum {
SecPolicySearchCreate_FUNC,
SecTrustCreateWithCertificates_FUNC,
SectRgn_FUNC,
- SetFrontProcess_FUNC,
SetRect_FUNC,
SetSystemUIMode_FUNC,
SetThemeCursor_FUNC,
diff --git a/bundles/org.eclipse.swt/Eclipse SWT PI/cocoa/org/eclipse/swt/internal/cocoa/OS.java b/bundles/org.eclipse.swt/Eclipse SWT PI/cocoa/org/eclipse/swt/internal/cocoa/OS.java
index 75b7edcf97..dad5f46630 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT PI/cocoa/org/eclipse/swt/internal/cocoa/OS.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT PI/cocoa/org/eclipse/swt/internal/cocoa/OS.java
@@ -224,8 +224,6 @@ public static final native int Gestalt(int selector, int[] response);
/** @param psn cast=(ProcessSerialNumber *) */
public static final native int GetCurrentProcess(int[] psn);
/** @param psn cast=(ProcessSerialNumber *) */
-public static final native int SetFrontProcess(int[] psn);
-/** @param psn cast=(ProcessSerialNumber *) */
public static final native int TransformProcessType(int[] psn, int transformState);
public static final native int CPSSetProcessName(int[] psn, long /*int*/ name);
/** @method flags=dynamic */
diff --git a/bundles/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/widgets/Display.java b/bundles/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/widgets/Display.java
index ceea364dfb..c40406daa9 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/widgets/Display.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/widgets/Display.java
@@ -870,9 +870,6 @@ void createDisplay (DeviceData data) {
if (OS.VERSION_MMB >= OS.VERSION_MMB (10, 9, 0)) {
application.setActivationPolicy (OS.NSApplicationActivationPolicyRegular);
NSRunningApplication.currentApplication().activateWithOptions (OS.NSApplicationActivateIgnoringOtherApps);
- } else {
- OS.TransformProcessType (psn, OS.kProcessTransformToForegroundApplication);
- OS.SetFrontProcess (psn);
}
}
ptr = C.getenv (ascii ("APP_ICON_" + pid));

Back to the top