summaryrefslogtreecommitdiff
path: root/src/managers/input/InputManager.hpp
diff options
context:
space:
mode:
authorVaxry <vaxry@vaxry.net>2023-10-29 18:09:05 +0000
committerVaxry <vaxry@vaxry.net>2023-10-29 18:09:05 +0000
commit7a5234a0cca2508b7a5ede1fc60dc3ae8b72a51c (patch)
tree581626c545765a0f797a4f4681100facb0826b0f /src/managers/input/InputManager.hpp
parentaf9440152e19cee74b675e53087e032b9ccb5459 (diff)
input: better cursor image infrastructure
Improves handling of cursor images/surfaces Fixes an issue with decos and cursors Fixes #3471
Diffstat (limited to 'src/managers/input/InputManager.hpp')
-rw-r--r--src/managers/input/InputManager.hpp19
1 files changed, 13 insertions, 6 deletions
diff --git a/src/managers/input/InputManager.hpp b/src/managers/input/InputManager.hpp
index 670bc4da..b4d365ee 100644
--- a/src/managers/input/InputManager.hpp
+++ b/src/managers/input/InputManager.hpp
@@ -229,15 +229,22 @@ class CInputManager {
void setBorderCursorIcon(eBorderIconDirection);
void setCursorIconOnBorder(CWindow* w);
+ // temporary. Obeys setUntilUnset.
+ void setCursorImageOverride(const std::string& name);
+
// cursor surface
- // struct cursorSI {
- // wlr_surface* pSurface = nullptr;
- // Vector2D vHotspot;
- // bool bUsed = false;
- // } cursorSurfaceInfo;
- // DYNLISTENER(CursorSurfaceDestroy);
+ struct cursorSI {
+ bool hidden = false; // null surface = hidden
+ CWLSurface wlSurface;
+ Vector2D vHotspot;
+ std::string name; // if not empty, means set by name.
+ bool inUse = false;
+ } m_sCursorSurfaceInfo;
+
+ void restoreCursorIconToApp(); // no-op if restored
friend class CKeybindManager;
+ friend class CWLSurface;
};
inline std::unique_ptr<CInputManager> g_pInputManager;