renderer: documentation

This commit is contained in:
patrick96 2023-03-23 23:12:50 +01:00
parent 58e0911ac6
commit 47f6d9c25d
No known key found for this signature in database
GPG Key ID: 521E5E03AEBCA1A7
3 changed files with 7 additions and 4 deletions

View File

@ -109,13 +109,17 @@ class renderer : public renderer_interface,
xcb_colormap_t m_colormap{XCB_NONE}; xcb_colormap_t m_colormap{XCB_NONE};
xcb_visualtype_t* m_visual; xcb_visualtype_t* m_visual;
xcb_gcontext_t m_gcontext; xcb_gcontext_t m_gcontext;
/**
* Background pixmap for the bar window
*
* All bar contents are rendered onto this.
*/
xcb_pixmap_t m_pixmap; xcb_pixmap_t m_pixmap;
xcb_rectangle_t m_rect{0, 0, 0U, 0U}; xcb_rectangle_t m_rect{0, 0, 0U, 0U};
reserve_area m_cleararea{}; reserve_area m_cleararea{};
// bool m_autosize{false};
unique_ptr<cairo::context> m_context; unique_ptr<cairo::context> m_context;
unique_ptr<cairo::xcb_surface> m_surface; unique_ptr<cairo::xcb_surface> m_surface;
map<alignment, alignment_block> m_blocks; map<alignment, alignment_block> m_blocks;

View File

@ -87,7 +87,6 @@ renderer::renderer(connection& conn, signal_emitter& sig, const config& conf, co
m_pixmap = m_connection.generate_id(); m_pixmap = m_connection.generate_id();
m_connection.create_pixmap(m_depth, m_pixmap, m_window, m_bar.size.w, m_bar.size.h); m_connection.create_pixmap(m_depth, m_pixmap, m_window, m_bar.size.w, m_bar.size.h);
// TODO
uint32_t configure_mask = 0; uint32_t configure_mask = 0;
std::array<uint32_t, 32> configure_values{}; std::array<uint32_t, 32> configure_values{};
xcb_params_cw_t configure_params{}; xcb_params_cw_t configure_params{};
@ -373,6 +372,7 @@ void renderer::flush() {
highlight_clickable_areas(); highlight_clickable_areas();
m_surface->flush(); 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.clear_area(0, m_window, 0, 0, m_bar.size.w, m_bar.size.h);
m_connection.flush(); m_connection.flush();

View File

@ -119,7 +119,6 @@ void unembed(connection& conn, xcb_window_t win, xcb_window_t root) {
conn.reparent_window_checked(win, root, 0, 0); conn.reparent_window_checked(win, root, 0, 0);
} catch (const xpp::x::error::window& err) { } catch (const xpp::x::error::window& err) {
// invalid window // invalid window
// TODO
logger::make().err("tray: Failed to unembed window '%s' (%s)", ewmh_util::get_wm_name(win), conn.id(win)); logger::make().err("tray: Failed to unembed window '%s' (%s)", ewmh_util::get_wm_name(win), conn.id(win));
} }
} }