From bdfe6555560d21a608355979bff49c691fc10bfc Mon Sep 17 00:00:00 2001
From: patrick96
Date: Mon, 4 Apr 2022 21:07:40 +0200
Subject: [PATCH] tray: Reuse bar visual
---
src/x11/tray_manager.cpp | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/src/x11/tray_manager.cpp b/src/x11/tray_manager.cpp
index a6904de1..daaf28d9 100644
--- a/src/x11/tray_manager.cpp
+++ b/src/x11/tray_manager.cpp
@@ -570,8 +570,7 @@ void tray_manager::create_bg() {
* Set window WM hints
*/
void tray_manager::set_wm_hints() {
- // TODO use same visual as bar/tray window
- const xcb_visualid_t visual{m_connection.screen()->root_visual};
+ const xcb_visualid_t visual{m_bar_opts.x_data.visual->visual_id};
const uint32_t orientation{_NET_SYSTEM_TRAY_ORIENTATION_HORZ};
m_log.trace("bar: Set window WM_NAME / WM_CLASS");