diff --git a/tests/test.c b/tests/test.c index 67b8f44..749fbd3 100644 --- a/tests/test.c +++ b/tests/test.c @@ -26,6 +26,7 @@ int main(int argc, char** argv) { int ret = cairo_surface_write_to_png(data[0]->surface, "/tmp/arrowC.png"); hyprcursor_cursor_image_data_free(data, dataSize); + hyprcursor_style_done(mgr, info); if (ret) { printf("cairo failed\n"); diff --git a/tests/test.cpp b/tests/test.cpp index 9fd711a..155f120 100644 --- a/tests/test.cpp +++ b/tests/test.cpp @@ -4,14 +4,16 @@ int main(int argc, char** argv) { Hyprcursor::CHyprcursorManager mgr(nullptr); + Hyprcursor::SCursorStyleInfo style{.size = 48}; + // preload size 48 for testing - if (!mgr.loadThemeStyle(Hyprcursor::SCursorStyleInfo{.size = 48})) { + if (!mgr.loadThemeStyle(style)) { std::cout << "failed loading style\n"; return 1; } // get cursor for left_ptr - const auto SHAPEDATA = mgr.getShape("left_ptr", Hyprcursor::SCursorStyleInfo{.size = 48}); + const auto SHAPEDATA = mgr.getShape("left_ptr", style); if (SHAPEDATA.images.empty()) { std::cout << "no images\n"; @@ -25,6 +27,8 @@ int main(int argc, char** argv) { std::cout << "Cairo returned for write: " << RET << "\n"; + mgr.cursorSurfaceStyleDone(style); + if (RET) return 1;