tray: Address rendering related TODOs

Currently, we don't support 32-bit visuals and don't set
_NET_SYSTEM_TRAY_VISUAL

It is unclear what happens if the default visual (which is used as a
fallback if _NET_SYSTEM_TRAY_VISUAL is not set) is 32-bit.
In that case, we may need to explicitly use a 24-bit visual.
This commit is contained in:
patrick96 2023-03-25 19:19:09 +01:00
parent 3e3a380069
commit 23153c3a23
No known key found for this signature in database
GPG Key ID: 521E5E03AEBCA1A7
2 changed files with 0 additions and 21 deletions

View File

@ -21,16 +21,6 @@ namespace tray {
*
* True transprency is currently not supported here because it cannot be achieved with external compositors (those only
* seem to work for top-level windows) and has to be implemented by hand.
*
* TODO proper background of wrapper window:
*
* (TODO: Check if this is still necessary, the current approach seems to work)
*
* Do first possible:
*
* 1. Use PARENT_RELATIVE if tray window depths, etc. matches the bar window
* 2. Use pseudo-transparency when activated (make sure the depths match)
* 3. Use background color
*/
client::client(
const logger& log, connection& conn, xcb_window_t parent, xcb_window_t win, size s, rgba desired_background)

View File

@ -119,8 +119,6 @@ void manager::activate() {
try {
set_tray_colors();
set_tray_orientation();
// TODO
// set_tray_visual();
} catch (const exception& err) {
m_log.err(err.what());
m_log.err("Cannot activate tray manager... failed to setup window");
@ -351,15 +349,6 @@ void manager::set_tray_orientation() {
XCB_ATOM_CARDINAL, 32, 1, &orientation);
}
// TODO remove, we should probably not set a visual at all (or only a 24-bit one)
void manager::set_tray_visual() {
// TODO use bar visual
const uint32_t visualid = m_connection.visual_type(XCB_VISUAL_CLASS_TRUE_COLOR, 32)->visual_id;
m_log.trace("tray: Set _NET_SYSTEM_TRAY_VISUAL to 0x%x", visualid);
m_connection.change_property_checked(
XCB_PROP_MODE_REPLACE, m_opts.selection_owner, _NET_SYSTEM_TRAY_VISUAL, XCB_ATOM_VISUALID, 32, 1, &visualid);
}
/**
* Acquire the systray selection
*