mirror of https://github.com/polybar/polybar.git
fix(xwindow): Crash when no tag is set in format (#2833)
* xwindow works without tag * changelog
This commit is contained in:
parent
5719d130fd
commit
03987b19a5
|
@ -41,6 +41,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
|||
- config:
|
||||
- Error reporting for deprecated config values ([`#2724`](https://github.com/polybar/polybar/issues/2724))
|
||||
- Also monitor include-files for changes when --reload is set ([`#675`](https://github.com/polybar/polybar/issues/675), [`#2759`](https://github.com/polybar/polybar/pull/2759))
|
||||
- `internal/xwindow`: module does not crash when a tag is not provided in format ([`#2826`](https://github.com/polybar/polybar/issues/2826), [`#2833`](https://github.com/polybar/polybar/pull/2833)) by [@VanillaViking](https://github.com/VanillaViking)
|
||||
|
||||
## [3.6.3] - 2022-05-04
|
||||
### Fixed
|
||||
|
|
|
@ -123,14 +123,16 @@ namespace modules {
|
|||
}
|
||||
}
|
||||
|
||||
if (m_active) {
|
||||
m_label = m_statelabels.at(state::ACTIVE)->clone();
|
||||
m_label->reset_tokens();
|
||||
m_label->replace_token("%title%", m_active->title());
|
||||
m_label->replace_token("%instance%", m_active->instance_name());
|
||||
m_label->replace_token("%class%", m_active->class_name());
|
||||
} else {
|
||||
m_label = m_statelabels.at(state::EMPTY)->clone();
|
||||
if (!m_statelabels.empty()) {
|
||||
if (m_active) {
|
||||
m_label = m_statelabels.at(state::ACTIVE)->clone();
|
||||
m_label->reset_tokens();
|
||||
m_label->replace_token("%title%", m_active->title());
|
||||
m_label->replace_token("%instance%", m_active->instance_name());
|
||||
m_label->replace_token("%class%", m_active->class_name());
|
||||
} else {
|
||||
m_label = m_statelabels.at(state::EMPTY)->clone();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue