diff options
| author | Vaxry <43317083+vaxerski@users.noreply.github.com> | 2024-03-09 16:52:59 +0000 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2024-03-09 16:52:59 +0000 |
| commit | c3882bb83240b602277f2d22f21d71690531f62e (patch) | |
| tree | c5e9a1110cd5d22ef700fd8b7408a418cba7c4f0 /src/debug/HyprCtl.cpp | |
| parent | e7a5db4852d654596e554b9cdeaa2694b346ee03 (diff) | |
internal: Support libhyprcursor (#5009)
woo
---------
Co-authored-by: Mihai Fufezan <fufexan@protonmail.com>
Diffstat (limited to 'src/debug/HyprCtl.cpp')
| -rw-r--r-- | src/debug/HyprCtl.cpp | 12 |
1 files changed, 2 insertions, 10 deletions
diff --git a/src/debug/HyprCtl.cpp b/src/debug/HyprCtl.cpp index 80b1d16c..f13843a3 100644 --- a/src/debug/HyprCtl.cpp +++ b/src/debug/HyprCtl.cpp @@ -16,6 +16,7 @@ #include <typeindex> #include "../config/ConfigValue.hpp" +#include "../managers/CursorManager.hpp" static void trimTrailingComma(std::string& str) { if (!str.empty() && str.back() == ',') @@ -1045,16 +1046,7 @@ std::string dispatchSetCursor(eHyprCtlOutputFormat format, std::string request) if (size <= 0) return "size not positive"; - wlr_xcursor_manager_destroy(g_pCompositor->m_sWLRXCursorMgr); - - g_pCompositor->m_sWLRXCursorMgr = wlr_xcursor_manager_create(theme.c_str(), size); - - setenv("XCURSOR_SIZE", SIZESTR.c_str(), true); - setenv("XCURSOR_THEME", theme.c_str(), true); - - for (auto& m : g_pCompositor->m_vMonitors) { - wlr_xcursor_manager_load(g_pCompositor->m_sWLRXCursorMgr, m->scale); - } + g_pCursorManager->changeTheme(theme, size); return "ok"; } |
