mirror of
https://github.com/hyprwm/hyprcursor.git
synced 2024-12-22 02:09:48 +01:00
core: fixup overridenBy reporting
This commit is contained in:
parent
34efe230c2
commit
5729b9733d
1 changed files with 5 additions and 2 deletions
|
@ -399,11 +399,14 @@ SCursorRawShapeDataC* CHyprcursorManager::getRawShapeDataC(const char* shape_) {
|
|||
|
||||
for (auto& shape : impl->theme.shapes) {
|
||||
// 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()) {
|
||||
data->overridenBy = strdup(IT->c_str());
|
||||
if (const auto IT = std::find_if(shape->overrides.begin(), shape->overrides.end(), [&](const auto& e) { return e == SHAPE && SHAPE != shape->directory; });
|
||||
IT != shape->overrides.end()) {
|
||||
data->overridenBy = strdup(shape->directory.c_str());
|
||||
return data;
|
||||
}
|
||||
}
|
||||
|
||||
for (auto& shape : impl->theme.shapes) {
|
||||
if (shape->directory != SHAPE)
|
||||
continue;
|
||||
|
||||
|
|
Loading…
Reference in a new issue