mirror of
https://github.com/hyprwm/Hyprland
synced 2024-11-26 05:05:59 +01:00
cursormgr: fix cursor gsettings on session change (#7295)
This commit is contained in:
parent
77cf651825
commit
39df1f4dbf
5 changed files with 11 additions and 4 deletions
|
@ -393,6 +393,7 @@ void CCompositor::initAllSignals() {
|
||||||
}
|
}
|
||||||
|
|
||||||
g_pConfigManager->m_bWantsMonitorReload = true;
|
g_pConfigManager->m_bWantsMonitorReload = true;
|
||||||
|
g_pCursorManager->syncGsettings();
|
||||||
} else {
|
} else {
|
||||||
Debug::log(LOG, "Session got deactivated!");
|
Debug::log(LOG, "Session got deactivated!");
|
||||||
|
|
||||||
|
|
|
@ -338,3 +338,7 @@ bool CCursorManager::changeTheme(const std::string& name, const int size) {
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void CCursorManager::syncGsettings() {
|
||||||
|
m_pXcursor->syncGsettings();
|
||||||
|
}
|
||||||
|
|
|
@ -53,6 +53,7 @@ class CCursorManager {
|
||||||
void updateTheme();
|
void updateTheme();
|
||||||
SCursorImageData dataFor(const std::string& name); // for xwayland
|
SCursorImageData dataFor(const std::string& name); // for xwayland
|
||||||
void setXWaylandCursor();
|
void setXWaylandCursor();
|
||||||
|
void syncGsettings();
|
||||||
|
|
||||||
void tickAnimatedCursor();
|
void tickAnimatedCursor();
|
||||||
|
|
||||||
|
|
|
@ -5,6 +5,7 @@
|
||||||
#include <gio/gsettingsschema.h>
|
#include <gio/gsettingsschema.h>
|
||||||
#include "config/ConfigValue.hpp"
|
#include "config/ConfigValue.hpp"
|
||||||
#include "helpers/CursorShapes.hpp"
|
#include "helpers/CursorShapes.hpp"
|
||||||
|
#include "../managers/CursorManager.hpp"
|
||||||
#include "debug/Log.hpp"
|
#include "debug/Log.hpp"
|
||||||
#include "XCursorManager.hpp"
|
#include "XCursorManager.hpp"
|
||||||
|
|
||||||
|
|
|
@ -31,6 +31,7 @@ class CXCursorManager {
|
||||||
|
|
||||||
void loadTheme(const std::string& name, int size);
|
void loadTheme(const std::string& name, int size);
|
||||||
SP<SXCursors> getShape(std::string const& shape, int size);
|
SP<SXCursors> getShape(std::string const& shape, int size);
|
||||||
|
void syncGsettings();
|
||||||
|
|
||||||
private:
|
private:
|
||||||
SP<SXCursors> createCursor(std::string const& shape, XcursorImages* xImages);
|
SP<SXCursors> createCursor(std::string const& shape, XcursorImages* xImages);
|
||||||
|
@ -38,7 +39,6 @@ class CXCursorManager {
|
||||||
std::string getLegacyShapeName(std::string const& shape);
|
std::string getLegacyShapeName(std::string const& shape);
|
||||||
std::vector<SP<SXCursors>> loadStandardCursors(std::string const& name, int size);
|
std::vector<SP<SXCursors>> loadStandardCursors(std::string const& name, int size);
|
||||||
std::vector<SP<SXCursors>> loadAllFromDir(std::string const& path, int size);
|
std::vector<SP<SXCursors>> loadAllFromDir(std::string const& path, int size);
|
||||||
void syncGsettings();
|
|
||||||
|
|
||||||
int lastLoadSize = 0;
|
int lastLoadSize = 0;
|
||||||
std::string themeName = "";
|
std::string themeName = "";
|
||||||
|
|
Loading…
Reference in a new issue