mirror of
https://github.com/polybar/polybar.git
synced 2024-11-18 13:55:11 -05:00
fix(xrm): res_class==nullptr to properly get the resource (#368)
Not sure what "String" was supposed to do, my tests with xcb-xrm gives that res_class==nullptr properly gets the resource value, =="String" does not.
This commit is contained in:
parent
1fdc742606
commit
b6661825ce
1 changed files with 1 additions and 1 deletions
|
@ -36,7 +36,7 @@ class xresource_manager {
|
||||||
template <typename T>
|
template <typename T>
|
||||||
T require(const char* name) const {
|
T require(const char* name) const {
|
||||||
char* result{nullptr};
|
char* result{nullptr};
|
||||||
if (xcb_xrm_resource_get_string(m_xrm, string_util::replace(name, "*", ".").c_str(), "String", &result) == -1) {
|
if (xcb_xrm_resource_get_string(m_xrm, string_util::replace(name, "*", ".").c_str(), nullptr, &result) == -1) {
|
||||||
throw xresource_error(sstream() << "X resource \"" << name << "\" not found");
|
throw xresource_error(sstream() << "X resource \"" << name << "\" not found");
|
||||||
} else if (result == nullptr) {
|
} else if (result == nullptr) {
|
||||||
throw xresource_error(sstream() << "X resource \"" << name << "\" not found");
|
throw xresource_error(sstream() << "X resource \"" << name << "\" not found");
|
||||||
|
|
Loading…
Reference in a new issue