mirror of
https://github.com/hyprwm/Hyprland
synced 2024-11-22 18:25:59 +01:00
cursormgr: log theme loading failures
This commit is contained in:
parent
1e82d5a04d
commit
294ff8609f
1 changed files with 6 additions and 0 deletions
|
@ -15,6 +15,9 @@ static int cursorAnimTimer(void* data) {
|
|||
CCursorManager::CCursorManager() {
|
||||
m_pHyprcursor = std::make_unique<Hyprcursor::CHyprcursorManager>(m_szTheme.empty() ? nullptr : m_szTheme.c_str());
|
||||
|
||||
if (!m_pHyprcursor->valid())
|
||||
Debug::log(ERR, "Hyprcursor failed loading theme \"{}\", falling back to X.", m_szTheme);
|
||||
|
||||
// find default size. First, HYPRCURSOR_SIZE, then XCURSOR_SIZE, then 24
|
||||
auto SIZE = getenv("HYPRCURSOR_SIZE");
|
||||
if (SIZE) {
|
||||
|
@ -224,6 +227,9 @@ void CCursorManager::changeTheme(const std::string& name, const int size) {
|
|||
m_szTheme = name;
|
||||
m_iSize = size;
|
||||
|
||||
if (!m_pHyprcursor->valid())
|
||||
Debug::log(ERR, "Hyprcursor failed loading theme \"{}\", falling back to X.", m_szTheme);
|
||||
|
||||
setenv("XCURSOR_SIZE", std::to_string(m_iSize).c_str(), true);
|
||||
setenv("XCURSOR_THEME", name.c_str(), true);
|
||||
|
||||
|
|
Loading…
Reference in a new issue