diff options
| author | Vaxry <vaxry@vaxry.net> | 2024-04-15 16:45:08 +0100 |
|---|---|---|
| committer | Vaxry <vaxry@vaxry.net> | 2024-04-15 16:45:08 +0100 |
| commit | 3dbf8e936e5646d2e935509399f430fec850398a (patch) | |
| tree | 6002dd92d6462ca0571d7eb55693d830df074a08 /src/managers/CursorManager.cpp | |
| parent | d1c2d524a0f0e92783d707b7e6552ac74075146c (diff) | |
cursor: add hyprcursor loggers
Diffstat (limited to 'src/managers/CursorManager.cpp')
| -rw-r--r-- | src/managers/CursorManager.cpp | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/src/managers/CursorManager.cpp b/src/managers/CursorManager.cpp index 4743b62b..627ca5e1 100644 --- a/src/managers/CursorManager.cpp +++ b/src/managers/CursorManager.cpp @@ -12,8 +12,15 @@ static int cursorAnimTimer(void* data) { return 1; } +static void hcLogger(enum eHyprcursorLogLevel level, char* message) { + if (level == HC_LOG_TRACE) + return; + + Debug::log(NONE, "[hc] {}", message); +} + CCursorManager::CCursorManager() { - m_pHyprcursor = std::make_unique<Hyprcursor::CHyprcursorManager>(m_szTheme.empty() ? nullptr : m_szTheme.c_str()); + m_pHyprcursor = std::make_unique<Hyprcursor::CHyprcursorManager>(m_szTheme.empty() ? nullptr : m_szTheme.c_str(), hcLogger); if (!m_pHyprcursor->valid()) Debug::log(ERR, "Hyprcursor failed loading theme \"{}\", falling back to X.", m_szTheme); @@ -224,7 +231,7 @@ void CCursorManager::updateTheme() { } void CCursorManager::changeTheme(const std::string& name, const int size) { - m_pHyprcursor = std::make_unique<Hyprcursor::CHyprcursorManager>(name.empty() ? "" : name.c_str()); + m_pHyprcursor = std::make_unique<Hyprcursor::CHyprcursorManager>(name.empty() ? "" : name.c_str(), hcLogger); m_szTheme = name; m_iSize = size; |
