fix(ipc): Update bar when making bar visible
While an update was forced whenever polybar was made visible, the `m_lastinput` variable was still set to the same value as when the bar became hidden because updates to it were prevented. Fixes #1875
This commit is contained in:
parent
b162e17583
commit
1fc6942482
@ -319,19 +319,20 @@ void bar::parse(string&& data, bool force) {
|
||||
|
||||
std::lock_guard<std::mutex> 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) {
|
||||
|
Loading…
Reference in New Issue
Block a user