lib: Count cursor-less themes as invalid (#31)

This commit is contained in:
SoSeDiK 2024-04-10 19:29:25 +03:00 committed by GitHub
parent 6742e9d3e2
commit f6a6322a03
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
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 loading fails, bool valid() will be false.
If theme has no valid cursor shapes, bool valid() will be false.
*/
class CHyprcursorManager {
public:

View file

@ -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;
}