Skip to content

Commit

Permalink
core: initialize C shape data fully
Browse files Browse the repository at this point in the history
  • Loading branch information
vaxerski committed Sep 30, 2024
1 parent 6664842 commit 6b4131e
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 2 deletions.
3 changes: 1 addition & 2 deletions libhyprcursor/VarList.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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())
Expand Down
6 changes: 6 additions & 0 deletions libhyprcursor/hyprcursor.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 6b4131e

Please sign in to comment.