From b6661825cef50a5eb67ebd9b7a4b22db23675984 Mon Sep 17 00:00:00 2001 From: Daniel Lublin Date: Mon, 23 Jan 2017 17:54:20 +0100 Subject: [PATCH] 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. --- include/x11/xresources.hpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/x11/xresources.hpp b/include/x11/xresources.hpp index b5f44d9e..763e6b72 100644 --- a/include/x11/xresources.hpp +++ b/include/x11/xresources.hpp @@ -36,7 +36,7 @@ class xresource_manager { template 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");