diff --git a/src/components/bar.cpp b/src/components/bar.cpp index c601f32b..d5ab892f 100644 --- a/src/components/bar.cpp +++ b/src/components/bar.cpp @@ -842,14 +842,17 @@ void bar::on_action_block_close(mousebtn btn) { // {{{ * Handle color change */ void bar::on_color_change(gc gc_, color color_) { // {{{ - m_log.trace_x("bar: color_change(%i, %s -> %s)", static_cast(gc_), color_.source(), color_); - - if (gc_ == gc::FG) { - m_fontmanager->allocate_color(color_); - } + m_log.trace_x("bar: color_change(%i, %s -> #%07x)", static_cast(gc_), color_.source(), + static_cast(color_)); const uint32_t value_list[]{color_}; m_connection.change_gc(m_gcontexts.at(gc_), XCB_GC_FOREGROUND, value_list); + + if (gc_ == gc::FG) { + m_fontmanager->allocate_color(color_); + } else if (gc_ == gc::BG) { + draw_shift(m_xpos, 0); + } } // }}} /**