fix(xkeyboard): Only update indicators when used
Was causing a segfault if `format = <label-layout>`
This commit is contained in:
parent
de3240b861
commit
b3f7cd08e9
@ -130,6 +130,7 @@ namespace modules {
|
|||||||
m_layout->replace_token("%number%", to_string(m_keyboard->current()));
|
m_layout->replace_token("%number%", to_string(m_keyboard->current()));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (m_formatter->has(TAG_LABEL_INDICATOR)) {
|
||||||
m_indicators.clear();
|
m_indicators.clear();
|
||||||
|
|
||||||
for (auto it : INDICATOR_TYPES) {
|
for (auto it : INDICATOR_TYPES) {
|
||||||
@ -157,6 +158,7 @@ namespace modules {
|
|||||||
indicator->replace_token("%icon%", icon->get());
|
indicator->replace_token("%icon%", icon->get());
|
||||||
m_indicators.emplace(it, move(indicator));
|
m_indicators.emplace(it, move(indicator));
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
// Trigger redraw
|
// Trigger redraw
|
||||||
broadcast();
|
broadcast();
|
||||||
|
Loading…
Reference in New Issue
Block a user