diff options
| author | Vaxry <vaxry@vaxry.net> | 2024-05-05 22:18:10 +0100 |
|---|---|---|
| committer | Vaxry <43317083+vaxerski@users.noreply.github.com> | 2024-05-09 13:37:39 +0100 |
| commit | ed411f53bdcf8d455f9e6ca769693aa84dc8372f (patch) | |
| tree | aacedb349acdd1022975d7b622dc7cfe11388223 /src/managers/CursorManager.hpp | |
| parent | e4e84064f2d07810e0c150bce1369a0a00503e9a (diff) | |
cursor: move to a hyprland impl
This moves wlr_cursor to a completely new impl mostly under
CPointerManager
Also adds beginSimple to OpenGL for simple render passes (e.g. cursor)
Diffstat (limited to 'src/managers/CursorManager.hpp')
| -rw-r--r-- | src/managers/CursorManager.hpp | 13 |
1 files changed, 9 insertions, 4 deletions
diff --git a/src/managers/CursorManager.hpp b/src/managers/CursorManager.hpp index 629f29e1..b4c5232a 100644 --- a/src/managers/CursorManager.hpp +++ b/src/managers/CursorManager.hpp @@ -9,6 +9,7 @@ struct wlr_buffer; struct wlr_xcursor_manager; struct wlr_xwayland; +class CWLSurface; class CCursorManager { public: @@ -18,7 +19,8 @@ class CCursorManager { wlr_buffer* getCursorBuffer(); void setCursorFromName(const std::string& name); - void setCursorSurface(wlr_surface* surf, const Vector2D& hotspot); + void setCursorSurface(CWLSurface* surf, const Vector2D& hotspot); + void setXCursor(const std::string& name); void changeTheme(const std::string& name, const int size); void updateTheme(); @@ -30,13 +32,16 @@ class CCursorManager { class CCursorBuffer { public: CCursorBuffer(cairo_surface_t* surf, const Vector2D& size, const Vector2D& hotspot); + CCursorBuffer(uint8_t* pixelData, const Vector2D& size, const Vector2D& hotspot); ~CCursorBuffer(); struct SCursorWlrBuffer { wlr_buffer base; - cairo_surface_t* surface = nullptr; - bool dropped = false; - CCursorBuffer* parent = nullptr; + cairo_surface_t* surface = nullptr; + bool dropped = false; + CCursorBuffer* parent = nullptr; + uint8_t* pixelData = nullptr; + size_t stride = 0; } wlrBuffer; private: |
