core: initialize C shape data fully

This commit is contained in:
Vaxry 2024-09-30 18:12:15 +01:00
parent 66648429bd
commit 6b4131ee52
2 changed files with 7 additions and 2 deletions

View file

@ -28,8 +28,7 @@ CVarList::CVarList(const std::string& in, const size_t lastArgNo, const char del
std::string args{in};
size_t idx = 0;
size_t pos = 0;
std::ranges::replace_if(
args, [&](const char& c) { return delim == 's' ? std::isspace(c) : c == delim; }, 0);
std::ranges::replace_if(args, [&](const char& c) { return delim == 's' ? std::isspace(c) : c == delim; }, 0);
for (const auto& s : args | std::views::split(0)) {
if (removeEmpty && s.empty())

View file

@ -389,6 +389,12 @@ SCursorRawShapeDataC* CHyprcursorManager::getRawShapeDataC(const char* shape_) {
SCursorRawShapeDataC* data = new SCursorRawShapeDataC;
std::vector<SLoadedCursorImage*> resultingImages;
data->overridenBy = nullptr;
data->images = nullptr;
data->len = 0;
data->hotspotX = 0;
data->hotspotY = 0;
data->resizeAlgo = eHyprcursorResizeAlgo::HC_RESIZE_NONE;
data->type = eHyprcursorDataType::HC_DATA_PNG;
for (auto& shape : impl->theme.shapes) {
// if it's overridden just return the override