aboutsummaryrefslogtreecommitdiffhomepage
path: root/src
diff options
context:
space:
mode:
authorIkalco <[email protected]>2024-08-13 12:27:00 -0500
committerGitHub <[email protected]>2024-08-13 18:27:00 +0100
commit39df1f4dbfedf97a7f30f9de359f3b3415844380 (patch)
tree1dafc1a5c5ab879c3658f4842165b2c63ff9ba9e /src
parent77cf651825c2afac69e3a827ff910a62c73e1218 (diff)
downloadHyprland-39df1f4dbfedf97a7f30f9de359f3b3415844380.tar.gz
Hyprland-39df1f4dbfedf97a7f30f9de359f3b3415844380.zip
cursormgr: fix cursor gsettings on session change (#7295)
Diffstat (limited to 'src')
-rw-r--r--src/Compositor.cpp1
-rw-r--r--src/managers/CursorManager.cpp6
-rw-r--r--src/managers/CursorManager.hpp3
-rw-r--r--src/managers/XCursorManager.cpp1
-rw-r--r--src/managers/XCursorManager.hpp4
5 files changed, 11 insertions, 4 deletions
diff --git a/src/Compositor.cpp b/src/Compositor.cpp
index a2f7c52a..26a985ef 100644
--- a/src/Compositor.cpp
+++ b/src/Compositor.cpp
@@ -393,6 +393,7 @@ void CCompositor::initAllSignals() {
}
g_pConfigManager->m_bWantsMonitorReload = true;
+ g_pCursorManager->syncGsettings();
} else {
Debug::log(LOG, "Session got deactivated!");
diff --git a/src/managers/CursorManager.cpp b/src/managers/CursorManager.cpp
index 3f3a25f6..e2dd5bb3 100644
--- a/src/managers/CursorManager.cpp
+++ b/src/managers/CursorManager.cpp
@@ -337,4 +337,8 @@ bool CCursorManager::changeTheme(const std::string& name, const int size) {
updateTheme();
return true;
-} \ No newline at end of file
+}
+
+void CCursorManager::syncGsettings() {
+ m_pXcursor->syncGsettings();
+}
diff --git a/src/managers/CursorManager.hpp b/src/managers/CursorManager.hpp
index ceb4816b..796ab10e 100644
--- a/src/managers/CursorManager.hpp
+++ b/src/managers/CursorManager.hpp
@@ -53,6 +53,7 @@ class CCursorManager {
void updateTheme();
SCursorImageData dataFor(const std::string& name); // for xwayland
void setXWaylandCursor();
+ void syncGsettings();
void tickAnimatedCursor();
@@ -75,4 +76,4 @@ class CCursorManager {
Hyprcursor::SCursorShapeData m_sCurrentCursorShapeData;
};
-inline std::unique_ptr<CCursorManager> g_pCursorManager; \ No newline at end of file
+inline std::unique_ptr<CCursorManager> g_pCursorManager;
diff --git a/src/managers/XCursorManager.cpp b/src/managers/XCursorManager.cpp
index 1108bbb2..3d36add5 100644
--- a/src/managers/XCursorManager.cpp
+++ b/src/managers/XCursorManager.cpp
@@ -5,6 +5,7 @@
#include <gio/gsettingsschema.h>
#include "config/ConfigValue.hpp"
#include "helpers/CursorShapes.hpp"
+#include "../managers/CursorManager.hpp"
#include "debug/Log.hpp"
#include "XCursorManager.hpp"
diff --git a/src/managers/XCursorManager.hpp b/src/managers/XCursorManager.hpp
index 464c1ec3..48fda5dd 100644
--- a/src/managers/XCursorManager.hpp
+++ b/src/managers/XCursorManager.hpp
@@ -31,6 +31,7 @@ class CXCursorManager {
void loadTheme(const std::string& name, int size);
SP<SXCursors> getShape(std::string const& shape, int size);
+ void syncGsettings();
private:
SP<SXCursors> createCursor(std::string const& shape, XcursorImages* xImages);
@@ -38,11 +39,10 @@ class CXCursorManager {
std::string getLegacyShapeName(std::string const& shape);
std::vector<SP<SXCursors>> loadStandardCursors(std::string const& name, int size);
std::vector<SP<SXCursors>> loadAllFromDir(std::string const& path, int size);
- void syncGsettings();
int lastLoadSize = 0;
std::string themeName = "";
SP<SXCursors> defaultCursor;
SP<SXCursors> hyprCursor;
std::vector<SP<SXCursors>> cursors;
-}; \ No newline at end of file
+};