Skip to content

Commit

Permalink
lib: Count cursor-less themes as invalid (#31)
Browse files Browse the repository at this point in the history
  • Loading branch information
SoSeDiK authored Apr 10, 2024
1 parent 6742e9d commit f6a6322
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 0 deletions.
2 changes: 2 additions & 0 deletions include/hyprcursor/hyprcursor.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,8 @@ namespace Hyprcursor {
If none found, bool valid() will be false.
If loading fails, bool valid() will be false.
If theme has no valid cursor shapes, bool valid() will be false.
*/
class CHyprcursorManager {
public:
Expand Down
5 changes: 5 additions & 0 deletions libhyprcursor/hyprcursor.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -248,6 +248,11 @@ void CHyprcursorManager::init(const char* themeName_) {
return;
}

if (impl->theme.shapes.empty()) {
Debug::log(HC_LOG_ERR, logFn, "Theme {} has no valid cursor shapes\n", impl->themeName);
return;
}

finalizedAndValid = true;
}

Expand Down

0 comments on commit f6a6322

Please sign in to comment.