Bug 432435 - [win32] Every program using an SWT UI is by
defaultidentified as the same application
Change-Id: I346044bd5dcc48282c6d174a35f38f7419cddb8f
Signed-off-by: Niraj Modi <niraj.modi@in.ibm.com>
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 483001f..e769734 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
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2000, 2012 IBM Corporation and others.
+ * Copyright (c) 2000, 2014 IBM Corporation and others.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
@@ -4276,6 +4276,10 @@
* On Motif, for example, this can be used to set
* the name used for resource lookup. Accessibility
* tools may also ask for the application name.
+ * On Windows, if application name is set to any
+ * value other than "SWT" (case insensitive), it is
+ * used to set the application user model ID which
+ * is used by the OS for taskbar grouping.
* </p><p>
* Specifying <code>null</code> for the name clears it.
* </p>
diff --git a/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Display.java b/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Display.java
index 629ff08..1909073 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Display.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Display.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2000, 2013 IBM Corporation and others.
+ * Copyright (c) 2000, 2014 IBM Corporation and others.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
@@ -3927,6 +3927,10 @@
* On Motif, for example, this can be used to set
* the name used for resource lookup. Accessibility
* tools may also ask for the application name.
+ * On Windows, if application name is set to any
+ * value other than "SWT" (case insensitive), it is
+ * used to set the application user model ID which
+ * is used by the OS for taskbar grouping.
* </p><p>
* Specifying <code>null</code> for the name clears it.
* </p>
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 9a6d405..2ae13d6 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
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2000, 2013 IBM Corporation and others.
+ * Copyright (c) 2000, 2014 IBM Corporation and others.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
@@ -2699,9 +2699,9 @@
protected void init () {
super.init ();
- /* Set the application user model ID */
+ /* Set the application user model ID, if APP_NAME is non Default */
char [] appName = null;
- if (APP_NAME != null) {
+ if (APP_NAME != null && !"SWT".equalsIgnoreCase (APP_NAME)) {
if (!OS.IsWinCE && OS.WIN32_VERSION >= OS.VERSION (6, 1)) {
int length = APP_NAME.length ();
appName = new char [length + 1];
@@ -4580,6 +4580,10 @@
* On Motif, for example, this can be used to set
* the name used for resource lookup. Accessibility
* tools may also ask for the application name.
+ * On Windows, if application name is set to any
+ * value other than "SWT" (case insensitive), it is
+ * used to set the application user model ID which
+ * is used by the OS for taskbar grouping.
* </p><p>
* Specifying <code>null</code> for the name clears it.
* </p>