xembedsniproxy: fix icon transparency
Original commit message(s)
- xembedsniproxy: fix icon transparency
Always use the 32-bit ARGB visual for container windows regardless of the default visual on the root window.
Reason for the change
Currently the container windows use visual info from the root window, which is 24-bit true color by default if not overridden in xorg.conf. While I don't understand why, even if the inner window has a 32-bit visual type with alpha channel as specified by _NET_SYSTEM_TRAY_VISUAL, as long as the parent container window doesn't, the image returned by xcb_image_get will lose transparency.
We already have code that queries for a 32-bit visual for _NET_SYSTEM_TRAY_VISUAL. So I just moved it to a global object so that it can be retrieved later in SNIProxy.
Test plan
Tested locally with niri + Waybar + Wine app with tray icon. (Sorry I don't have any KDE environment available for testing currently)
Screenshots or screen recordings
Before:
After: