mirror of
https://github.com/polybar/polybar.git
synced 2025-04-28 17:47:22 -04:00
parent
9e3a7cf06c
commit
374ad655ae
1 changed files with 8 additions and 9 deletions
|
@ -72,17 +72,16 @@ int xresource_manager::get_int(string name, int fallback) const {
|
||||||
* Query the database for given key
|
* Query the database for given key
|
||||||
*/
|
*/
|
||||||
string xresource_manager::load_value(const string& key, const string& res_type, size_t n) const {
|
string xresource_manager::load_value(const string& key, const string& res_type, size_t n) const {
|
||||||
if (m_manager == nullptr) {
|
if (m_manager != nullptr && m_db != nullptr) {
|
||||||
return "";
|
char* type = nullptr;
|
||||||
}
|
XrmValue ret{};
|
||||||
char* type = nullptr;
|
|
||||||
XrmValue ret{};
|
|
||||||
XrmGetResource(m_db, key.c_str(), res_type.c_str(), &type, &ret);
|
|
||||||
|
|
||||||
if (ret.addr != nullptr && !std::strncmp(res_type.c_str(), type, n)) {
|
if (XrmGetResource(m_db, key.c_str(), res_type.c_str(), &type, &ret)) {
|
||||||
return {ret.addr};
|
if (ret.addr != nullptr && !std::strncmp(res_type.c_str(), type, n)) {
|
||||||
|
return {ret.addr};
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
return "";
|
return "";
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue