Visual and background pixmap handling

If the _NET_SYSTEM_TRAY_VISUAL property (see below) is present, tray icon windows should be created using that visual. If the property is not present, then tray icon windows should be created using the default visual of the screen.

Historically, to allow the appearance of icons with transparent backgrounds on servers that did not support visuals with an alpha channel or the Composite extension, a convention was adopted where a background pixmap was set on the XEMBED embedder window, aligned properly to match the contents of the embedder window's parent, the tray icon window was set to have a background of ParentRelative, and drawing of the icon done on top of this background.

Setting the background of a window to ParentRelative when the depth of the window does not match the depth of the window's parent, or reparenting a window with a ParentRelative background into a parent with a non-matching depth produces a BadMatch error, so the embedder window must be created to match the visual of the tray icon window, even if the tray icon window does not have the visual provided in _NET_SYSTEM_TRAY_VISUAL. If convenient, the tray manager may set an appropriate background pixmap on the embedder window to provide the appearance of transparency. However, the preferred method of transparency is to use a visual with an alpha channel in _NET_SYSTEM_TRAY_VISUAL.