XWorkstation.st
changeset 8562 6a0b4f5f2f63
parent 8475 e1e3fa52dac0
child 8564 8f02ab430d57
--- a/XWorkstation.st	Mon Oct 29 14:58:14 2018 +0100
+++ b/XWorkstation.st	Tue Oct 30 12:45:45 2018 +0100
@@ -11010,19 +11010,28 @@
 setIcon:anIcon for:aWindowOrWindowID
     |buffer iWidth iHeight|
 
+    self assert:(anIcon depth == 32).
+    self assert:(anIcon photometric == #argb).
+    
     iWidth  := anIcon width.
     iHeight := anIcon height.
     buffer := IntegerArray new:(iWidth*iHeight+2).
     buffer at:1 put:iWidth.
     buffer at:2 put:iHeight.
-
-    self setProperty:#'_NET_WM_ICON' type:#CARDINAL value:buffer for:aWindowOrWindowID
-
-    "
-	Display setIcon:0 for:Transcript
+    buffer replaceFrom:3 with:anIcon bits startingAt:1.
+    
+    self 
+        setProperty:#'_NET_WM_ICON' 
+        type:#CARDINAL 
+        value:buffer 
+        for:aWindowOrWindowID
+
+    "
+     Display setIcon:0 for:Transcript
     "
 
     "Modified (comment): / 26-04-2018 / 10:59:17 / stefan"
+    "Modified: / 30-10-2018 / 12:39:53 / Claus Gittinger"
 !
 
 setProperty:propertySymbolOrAtomID type:typeSymbolOrAtomID value:anObject for:aWindowOrWindowIDOrNil