I have a strange problem with TTrayIcon which happens only in Linux (XFCE & LXDE). Occasionally the tray icon gets set to an error icon (please see the attachment). Roughly 75% of the time the icon shows up okay, rest of the time the error icon is shown.
I am periodically changing the TrayIcon, although this is not animation.
tiMain.Icon.Assign(FTrayProgressIcons[Index + 1].Bitmap);
- I tried tiMain.ShowIcon:= False; but this seem to do nothing. OnPaint event does not get triggered. Any pointers on how to get OnPaint event get working. Also, how do I invalidate the icon so that OnPaint gets triggered.
- Alternatively, what is wrong with what I am doing - Icon.Assign? Any tweaks which would get it to work in XFCE & LXDE?