summaryrefslogtreecommitdiff
path: root/src/managers/CursorManager.cpp
diff options
context:
space:
mode:
authorVaxry <vaxry@vaxry.net>2024-03-24 19:39:56 +0000
committerVaxry <vaxry@vaxry.net>2024-03-24 19:39:56 +0000
commit294ff8609f80b8e9d16233de94e49f992d5de33a (patch)
tree8778cd6d06f3f8d9b44c88c74adb29789c8a1da4 /src/managers/CursorManager.cpp
parent1e82d5a04d0ab75ea1d9aa763d28c1767d58e898 (diff)
cursormgr: log theme loading failures
Diffstat (limited to 'src/managers/CursorManager.cpp')
-rw-r--r--src/managers/CursorManager.cpp6
1 files changed, 6 insertions, 0 deletions
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<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);