From 2c4873016229203477f7e44fc832b4690b65c9ec Mon Sep 17 00:00:00 2001 From: Grant Gayed Date: Wed, 11 Apr 2012 16:46:42 -0400 Subject: Bug 336503 -AppID being changed unexpectedly --- .../Eclipse SWT/win32/org/eclipse/swt/widgets/Display.java | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'bundles/org.eclipse.swt/Eclipse SWT/win32') 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]); } } -- cgit