diff --git a/src/components/bar.cpp b/src/components/bar.cpp index 1ba76b5f..53dae9a9 100644 --- a/src/components/bar.cpp +++ b/src/components/bar.cpp @@ -319,19 +319,20 @@ void bar::parse(string&& data, bool force) { std::lock_guard guard(m_mutex, std::adopt_lock); + bool unchanged = data == m_lastinput; + + m_lastinput = data; + if (force) { m_log.trace("bar: Force update"); } else if (!m_visible) { return m_log.trace("bar: Ignoring update (invisible)"); } else if (m_opts.shaded) { return m_log.trace("bar: Ignoring update (shaded)"); - } else if (data == m_lastinput) { + } else if (unchanged) { return m_log.trace("bar: Ignoring update (unchanged)"); - return; } - m_lastinput = data; - auto rect = m_opts.inner_area(); if (m_tray && !m_tray->settings().detached && m_tray->settings().configured_slots) {