diff --git a/include/x11/xutils.hpp b/include/x11/xutils.hpp index 26d1e774..49b7ab86 100644 --- a/include/x11/xutils.hpp +++ b/include/x11/xutils.hpp @@ -18,6 +18,8 @@ namespace xutils { void pack_values(uint32_t mask, const xcb_params_configure_window_t* src, uint32_t* dest); void visibility_notify(connection& conn, const xcb_window_t& win, xcb_visibility_t state); + + void compton_shadow_exclude(connection& conn, const xcb_window_t& win); } POLYBAR_NS_END diff --git a/src/x11/tray.cpp b/src/x11/tray.cpp index 9a02f3b3..bc6c99df 100644 --- a/src/x11/tray.cpp +++ b/src/x11/tray.cpp @@ -527,6 +527,8 @@ void tray_manager::create_window() { // {{{ m_connection.create_window_checked( scr->root_depth, m_tray, scr->root, x, y, w, h, 0, XCB_WINDOW_CLASS_INPUT_OUTPUT, scr->root_visual, mask, values); + + xutils::compton_shadow_exclude(m_connection, m_tray); } // }}} /** diff --git a/src/x11/xutils.cpp b/src/x11/xutils.cpp index 018c8eff..99b72bd5 100644 --- a/src/x11/xutils.cpp +++ b/src/x11/xutils.cpp @@ -1,3 +1,4 @@ +#include "x11/atoms.hpp" #include "x11/xutils.hpp" #include "x11/connection.hpp" #include "x11/xlib.hpp" @@ -45,6 +46,11 @@ namespace xutils { const char* data = reinterpret_cast(notify.get()); conn.send_event(true, win, XCB_EVENT_MASK_NO_EVENT, data); } + + void compton_shadow_exclude(connection& conn, const xcb_window_t& win) { + const uint32_t shadow = 0; + conn.change_property(XCB_PROP_MODE_REPLACE, win, _COMPTON_SHADOW, XCB_ATOM_CARDINAL, 32, 1, &shadow); + } } POLYBAR_NS_END