[Bug] Windows app icons render as black squares in the KDE taskbar (RAIL window icon loses its transparency)
What's happening
When you launch a Windows app through WinBoat, the KDE taskbar shows a black square instead of the app icon. Weird part is the same icon looks totally fine everywhere else — clean and transparent in WinBoat's Apps page, and the PNG files it writes to disk for the shortcuts are fine too. It's just the taskbar entry for the actual RDP window that comes out as a black blob.
Why it's happening
Two separate bugs stacking on top of each other:
FreeRDP is flattening the icon's transparency to black. In RAIL/RemoteApp mode, the window icon gets sent over RDP as a standard ICO. Modern 32bpp icons store real per-pixel alpha in the XOR data, and also carry an AND mask that apps usually just leave zeroed out. The problem is FreeRDP's
freerdp_image_copy_from_icon_data()(inlibfreerdp/codec/color.c, still there as of 3.17.2) stomps on the per-pixel alpha with that binary AND mask whenevercbBitsMask > 0. So every pixel gets forced opaque, and anything that was supposed to be transparent (black, alpha 0) turns into solid black. KDE just displays whatever_NET_WM_ICONit's given — which is now a black icon.WinBoat's shortcuts don't link back to the actual window. On the 1.0 branch, the
.desktopfiles get namedwinboat-<uuid>.desktopand never setStartupWMClass. Meanwhile the window that actually launches has WM_CLASSwinboat-<AppName>(comes from/wm-class:inlaunchApp). Since nothing ties those together, KDE has no way to know "this running window belongs to this launcher entry" — so it can't group it, can't pin it right, and can't fall back to the good PNG icon we already have sitting right there.
The fix
- On WinBoat's end (I'll send a PR): add
StartupWMClass=winboat-<AppName>to the generated.desktopfiles, using the same name-cleaning logiclaunchAppalready uses so the two always match. Once KDE can match the window to its launcher, it'll group the task properly and show the real transparent PNG instead of FreeRDP's broken black one. Bonus: this also fixes pinning/grouping, which are broken right now for the same reason. - On FreeRDP's end (the actual root cause):
freerdp_image_copy_from_icon_data()should just trust the real 32bpp alpha when it's present, instead of overwriting it with the AND mask. Windows itself ignores the AND mask when per-pixel alpha is there, and Wine does the same. Worth filing upstream — until it's fixed there, anyone without a matching launcher entry is still going to see a black icon.
Environment
- KDE Plasma (Wayland), FreeRDP 3.x (reproduces with the bundled client too)
- WinBoat 1.0 bleeding edge for the shortcut-icon issue, but the black window icon itself isn't version-specific — it comes from FreeRDP, so it'll show up anywhere.
Source: TibixDev/winboat