diff --git a/include/components/renderer.hpp b/include/components/renderer.hpp index feab5cc1..87b9f86d 100644 --- a/include/components/renderer.hpp +++ b/include/components/renderer.hpp @@ -109,13 +109,17 @@ class renderer : public renderer_interface, xcb_colormap_t m_colormap{XCB_NONE}; xcb_visualtype_t* m_visual; xcb_gcontext_t m_gcontext; + + /** + * Background pixmap for the bar window + * + * All bar contents are rendered onto this. + */ xcb_pixmap_t m_pixmap; xcb_rectangle_t m_rect{0, 0, 0U, 0U}; reserve_area m_cleararea{}; - // bool m_autosize{false}; - unique_ptr m_context; unique_ptr m_surface; map m_blocks; diff --git a/src/components/renderer.cpp b/src/components/renderer.cpp index 8f97fbea..fa0f8ffc 100644 --- a/src/components/renderer.cpp +++ b/src/components/renderer.cpp @@ -87,7 +87,6 @@ renderer::renderer(connection& conn, signal_emitter& sig, const config& conf, co m_pixmap = m_connection.generate_id(); m_connection.create_pixmap(m_depth, m_pixmap, m_window, m_bar.size.w, m_bar.size.h); - // TODO uint32_t configure_mask = 0; std::array configure_values{}; xcb_params_cw_t configure_params{}; @@ -373,6 +372,7 @@ void renderer::flush() { highlight_clickable_areas(); m_surface->flush(); + // Clear entire window so that the new pixmap is shown m_connection.clear_area(0, m_window, 0, 0, m_bar.size.w, m_bar.size.h); m_connection.flush(); diff --git a/src/x11/xembed.cpp b/src/x11/xembed.cpp index 065d3c62..b228bd99 100644 --- a/src/x11/xembed.cpp +++ b/src/x11/xembed.cpp @@ -119,7 +119,6 @@ void unembed(connection& conn, xcb_window_t win, xcb_window_t root) { conn.reparent_window_checked(win, root, 0, 0); } catch (const xpp::x::error::window& err) { // invalid window - // TODO logger::make().err("tray: Failed to unembed window '%s' (%s)", ewmh_util::get_wm_name(win), conn.id(win)); } }