fix: Fill background for initial draw

Ref #179
This commit is contained in:
Michael Carlberg 2016-12-03 12:58:42 +01:00
parent e9db3fab3a
commit a1ad4de470

View File

@ -179,11 +179,11 @@ void bar::bootstrap(bool nodraw) {
g_signals::parser::unicode_text_write = bind(&renderer::draw_character, m_renderer.get(), ph::_1); g_signals::parser::unicode_text_write = bind(&renderer::draw_character, m_renderer.get(), ph::_1);
g_signals::parser::string_write = bind(&renderer::draw_textstring, m_renderer.get(), ph::_1, ph::_2); g_signals::parser::string_write = bind(&renderer::draw_textstring, m_renderer.get(), ph::_1, ph::_2);
// Render empty bar
try { try {
m_log.trace("bar: Drawing empty bar");
m_renderer->begin(); m_renderer->begin();
m_renderer->fill_background();
m_renderer->end(); m_renderer->end();
m_renderer->flush(false);
} catch (const exception& err) { } catch (const exception& err) {
throw application_error("Failed to output empty bar window (reason: " + string{err.what()} + ")"); throw application_error("Failed to output empty bar window (reason: " + string{err.what()} + ")");
} }