From bd56398f1970fd3956136c167d275b5eefd9391d Mon Sep 17 00:00:00 2001 From: Vaxry Date: Mon, 8 Apr 2024 18:23:14 +0100 Subject: [PATCH] lib: round hotspots in getShapes ref #28 --- libhyprcursor/hyprcursor.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/libhyprcursor/hyprcursor.cpp b/libhyprcursor/hyprcursor.cpp index 8166afd..1318223 100644 --- a/libhyprcursor/hyprcursor.cpp +++ b/libhyprcursor/hyprcursor.cpp @@ -335,8 +335,8 @@ SCursorImageData** CHyprcursorManager::getShapesC(int& outSize, const char* shap data[i]->delay = resultingImages[i]->delay; data[i]->size = resultingImages[i]->side; data[i]->surface = resultingImages[i]->cairoSurface; - data[i]->hotspotX = hotX * data[i]->size; - data[i]->hotspotY = hotY * data[i]->size; + data[i]->hotspotX = std::round(hotX * (float)data[i]->size); + data[i]->hotspotY = std::round(hotY * (float)data[i]->size); } outSize = resultingImages.size();