From 294ff8609f80b8e9d16233de94e49f992d5de33a Mon Sep 17 00:00:00 2001 From: Vaxry Date: Sun, 24 Mar 2024 19:39:56 +0000 Subject: [PATCH] cursormgr: log theme loading failures --- src/managers/CursorManager.cpp | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/managers/CursorManager.cpp b/src/managers/CursorManager.cpp index c4b624d4..ae258916 100644 --- a/src/managers/CursorManager.cpp +++ b/src/managers/CursorManager.cpp @@ -15,6 +15,9 @@ static int cursorAnimTimer(void* data) { CCursorManager::CCursorManager() { m_pHyprcursor = std::make_unique(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);