core: fixup overridenBy reporting

This commit is contained in:
Vaxry 2024-10-01 23:26:36 +01:00
parent 34efe230c2
commit 5729b9733d

View file

@ -399,11 +399,14 @@ SCursorRawShapeDataC* CHyprcursorManager::getRawShapeDataC(const char* shape_) {
for (auto& shape : impl->theme.shapes) { for (auto& shape : impl->theme.shapes) {
// if it's overridden just return the override // if it's overridden just return the override
if (const auto IT = std::find(shape->overrides.begin(), shape->overrides.end(), SHAPE); IT != shape->overrides.end()) { if (const auto IT = std::find_if(shape->overrides.begin(), shape->overrides.end(), [&](const auto& e) { return e == SHAPE && SHAPE != shape->directory; });
data->overridenBy = strdup(IT->c_str()); IT != shape->overrides.end()) {
data->overridenBy = strdup(shape->directory.c_str());
return data; return data;
} }
}
for (auto& shape : impl->theme.shapes) {
if (shape->directory != SHAPE) if (shape->directory != SHAPE)
continue; continue;