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()));
|
||||
}
|
||||
|
||||
if (m_formatter->has(TAG_LABEL_INDICATOR)) {
|
||||
m_indicators.clear();
|
||||
|
||||
for (auto it : INDICATOR_TYPES) {
|
||||
@ -157,6 +158,7 @@ namespace modules {
|
||||
indicator->replace_token("%icon%", icon->get());
|
||||
m_indicators.emplace(it, move(indicator));
|
||||
}
|
||||
}
|
||||
|
||||
// Trigger redraw
|
||||
broadcast();
|
||||
|
Loading…
Reference in New Issue
Block a user