diff options
author | Steve Northover | 2002-01-22 20:08:06 +0000 |
---|---|---|
committer | Steve Northover | 2002-01-22 20:08:06 +0000 |
commit | 0a707c3813949bd2fa8a2bc60a1293dd0df53349 (patch) | |
tree | 9b59fde5974630d45279b6ec8c140d4943dffd67 | |
parent | 851a1f7f1ab1d2230126600e098746972e978e82 (diff) | |
download | eclipse.platform.swt-0a707c3813949bd2fa8a2bc60a1293dd0df53349.tar.gz eclipse.platform.swt-0a707c3813949bd2fa8a2bc60a1293dd0df53349.tar.xz eclipse.platform.swt-0a707c3813949bd2fa8a2bc60a1293dd0df53349.zip |
*** empty log message ***
-rwxr-xr-x | bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/Decorations.java | 15 |
1 files changed, 14 insertions, 1 deletions
diff --git a/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/Decorations.java b/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/Decorations.java index 9cb5960927..d9d7c1a61f 100755 --- a/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/Decorations.java +++ b/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/Decorations.java @@ -764,9 +764,22 @@ public boolean setFocus () { */
public void setImage (Image image) {
checkWidget ();
+ if (image != null && image.isDisposed ()) error (SWT.ERROR_INVALID_ARGUMENT);
+ /*
+ * Feature in WinCE. WM_SETICON and WM_GETICON set the icon
+ * for the window class, not the window instance. This means
+ * that it is possible to set an icon into a window and then
+ * later free the icon, thus freeing the icon for every window.
+ * The fix is to avoid the API.
+ *
+ * On WinCE PPC, icons in windows are not displayed anyways.
+ */
+ if (OS.IsWinCE) {
+ this.image = image;
+ return;
+ }
int hIcon = 0;
if (image != null) {
- if (image.isDisposed()) error(SWT.ERROR_INVALID_ARGUMENT);
switch (image.type) {
case SWT.BITMAP:
int hOld = OS.SendMessage (handle, OS.WM_GETICON, OS.ICON_BIG, 0);
|