Count cursor-less themes as invalid

This commit is contained in:
SoSeDiK 2024-04-10 17:17:33 +03:00
parent 6742e9d3e2
commit 2eedbedd6d
2 changed files with 7 additions and 0 deletions

View file

@ -58,6 +58,8 @@ namespace Hyprcursor {
If none found, bool valid() will be false. If none found, bool valid() will be false.
If loading fails, 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 { class CHyprcursorManager {
public: public:

View file

@ -248,6 +248,11 @@ void CHyprcursorManager::init(const char* themeName_) {
return; return;
} }
if (impl->theme.shapes.empty()) {
Debug::log(HC_LOG_ERR, logFn, "Theme {} has no valid cursor shapes\n", impl->themeName);
return;
}
finalizedAndValid = true; finalizedAndValid = true;
} }