summaryrefslogtreecommitdiffstats
path: root/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt
diff options
context:
space:
mode:
authorGrant Gayed <grant_gayed@ca.ibm.com>2012-04-11 16:46:42 -0400
committerGrant Gayed <grant_gayed@ca.ibm.com>2012-04-11 16:48:19 -0400
commit2c4873016229203477f7e44fc832b4690b65c9ec (patch)
treeb8a710efd0678515de025a1ecf93b4f1d0b9d6f7 /bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt
parenteccb5765e67884d3747be267d9dd56e9daf3eca6 (diff)
downloadeclipse.platform.swt-2c4873016229203477f7e44fc832b4690b65c9ec.tar.gz
eclipse.platform.swt-2c4873016229203477f7e44fc832b4690b65c9ec.tar.xz
eclipse.platform.swt-2c4873016229203477f7e44fc832b4690b65c9ec.zip
Bug 336503 -AppID being changed unexpectedly
Diffstat (limited to 'bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt')
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/Display.java6
1 files changed, 5 insertions, 1 deletions
diff --git a/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/Display.java b/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/Display.java
index 0bf70ee45d..503548affd 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/Display.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/Display.java
@@ -2703,7 +2703,11 @@ protected void init () {
int length = APP_NAME.length ();
appName = new char [length + 1];
APP_NAME.getChars (0, length, appName, 0);
- OS.SetCurrentProcessExplicitAppUserModelID (appName);
+ int /*long*/ [] appID = new int /*long*/ [1];
+ if (OS.GetCurrentProcessExplicitAppUserModelID(appID) != 0) {
+ OS.SetCurrentProcessExplicitAppUserModelID (appName);
+ }
+ if (appID[0] != 0) OS.CoTaskMemFree(appID[0]);
}
}