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:
Daniel Lublin 2017-01-23 17:54:20 +01:00 committed by Michael Carlberg
parent 1fdc742606
commit b6661825ce
1 changed files with 1 additions and 1 deletions

View File

@ -36,7 +36,7 @@ class xresource_manager {
template <typename T>
T require(const char* name) const {
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");
} else if (result == nullptr) {
throw xresource_error(sstream() << "X resource \"" << name << "\" not found");