The current iconToBitmap() method in systray_windows.go uses the CreateCompatibleBitmap() Windows API as suggested in Microsoft Learn. But this method has a bug that makes the icon lose transparency information. This PR fixes the bug.
Solution
Replace CreateCompatibleBitmap() with CreateDIBSection(). Usage from:
Description
The current
iconToBitmap()
method insystray_windows.go
uses theCreateCompatibleBitmap()
Windows API as suggested in Microsoft Learn. But this method has a bug that makes the icon lose transparency information. This PR fixes the bug.Solution
Replace
CreateCompatibleBitmap()
withCreateDIBSection()
. Usage from:https://osdn.net/projects/tortoisesvn/scm/svn/commits/14191
Related
https://github.com/getlantern/systray/issues/207
https://github.com/getlantern/systray/issues/192
https://github.com/fleetdm/fleet/issues/6924
Screenshots
Before:
Fixed: