diff --git a/include/components/bar.hpp b/include/components/bar.hpp index 9e78b8ba..6463614c 100644 --- a/include/components/bar.hpp +++ b/include/components/bar.hpp @@ -784,8 +784,10 @@ class bar : public xpp::event::sinkallocate_color(color_); + m_xfont_color = color::parse(color_.rgb()).value(); + } } //}}} /** @@ -946,6 +948,13 @@ class bar : public xpp::event::sinkset_gcontext_font(m_gcontexts.at(gc::FG), m_gcfont); } + if (font->ptr && m_xfont_color != 0) { + m_log.trace_x("bar: Set gcontext color for xcb font"); + const uint32_t values[1]{m_xfont_color}; + m_connection.change_gc(m_gcontexts.at(gc::FG), XCB_GC_FOREGROUND, values); + m_xfont_color = 0; + } + // TODO: cache auto chr_width = m_fontmanager->char_width(font, character); @@ -1000,6 +1009,7 @@ class bar : public xpp::event::sink