From 35411a6184460b98479081072e4c949d242e476e Mon Sep 17 00:00:00 2001 From: Vaxry Date: Fri, 5 Apr 2024 16:53:46 +0100 Subject: [PATCH] add missing type arg --- include/hyprcursor/hyprcursor.hpp | 3 ++- include/hyprcursor/shared.h | 1 + libhyprcursor/hyprcursor.cpp | 1 + 3 files changed, 4 insertions(+), 1 deletion(-) diff --git a/include/hyprcursor/hyprcursor.hpp b/include/hyprcursor/hyprcursor.hpp index 6a8df94..0e0f280 100644 --- a/include/hyprcursor/hyprcursor.hpp +++ b/include/hyprcursor/hyprcursor.hpp @@ -44,6 +44,7 @@ namespace Hyprcursor { float hotspotY = 0; std::string overridenBy = ""; eHyprcursorResizeAlgo resizeAlgo = HC_RESIZE_NONE; + eHyprcursorDataType type = HC_DATA_PNG; }; /*! @@ -126,7 +127,7 @@ namespace Hyprcursor { return d; } - SCursorRawShapeData data{.hotspotX = CDATA->hotspotX, .hotspotY = CDATA->hotspotY, .overridenBy = "", .resizeAlgo = CDATA->resizeAlgo}; + SCursorRawShapeData data{.hotspotX = CDATA->hotspotX, .hotspotY = CDATA->hotspotY, .overridenBy = "", .resizeAlgo = CDATA->resizeAlgo, .type = CDATA->type}; for (size_t i = 0; i < CDATA->len; ++i) { SCursorRawShapeImageC* cimage = &CDATA->images[i]; diff --git a/include/hyprcursor/shared.h b/include/hyprcursor/shared.h index 215d20d..c3fb9c6 100644 --- a/include/hyprcursor/shared.h +++ b/include/hyprcursor/shared.h @@ -53,6 +53,7 @@ struct SCursorRawShapeDataC { float hotspotY; char* overridenBy; enum eHyprcursorResizeAlgo resizeAlgo; + enum eHyprcursorDataType type; }; typedef struct SCursorRawShapeDataC hyprcursor_cursor_raw_shape_data; diff --git a/libhyprcursor/hyprcursor.cpp b/libhyprcursor/hyprcursor.cpp index 593721b..11b145b 100644 --- a/libhyprcursor/hyprcursor.cpp +++ b/libhyprcursor/hyprcursor.cpp @@ -379,6 +379,7 @@ SCursorRawShapeDataC* CHyprcursorManager::getRawShapeDataC(const char* shape_) { data->hotspotX = shape->hotspotX; data->hotspotY = shape->hotspotY; + data->type = shape->shapeType == SHAPE_PNG ? HC_DATA_PNG : HC_DATA_SVG; break; }