mirror of
https://github.com/hyprwm/Hyprland.git
synced 2025-08-13 11:05:46 -07:00
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)
This commit is contained in:
@@ -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:
|
||||
|
Reference in New Issue
Block a user