On Tue Feb 13 19:48:49 2024 +0000, Rémi Bernon wrote:
Okay well I think it would be better to figure out what is going on, and find how to fix it properly then. Your previous change looked right, as the icons were created with the layered attribute but then never painted as layered windows (`UpdateLayeredWindow` was never called because `icon->layered` is FALSE unless they are docked). Yet, it was also working for me before, because somehow even with that attribute the windows can be painted normally, but I think it's better to only set the style if the windows are layered and going to be painted with `UpdateLayeredWindow`. Alternatively, if you can make the layered icons work for all the cases it might also make the code simpler. `UpdateLayeredWindow` is required for windows embedded in the host systray, it's not required for embedding in Wine systray or taskbar but maybe it could work.
Looks like the issue is that X11DRV_SystrayDockInsert is called before we make the window layered. Though I'm not sure how to fix this properly, because we check the return value of it first before setting it to layered.
I tried to make all icons layered but unfortunately that doesn't work for the Wine systray and I've no idea why (not familiar with this code).