windowrules: add noclosefor

fixes #10027
This commit is contained in:
Vaxry 2025-04-29 18:14:02 +01:00
parent 5bd7ff884d
commit b10a43dabc
No known key found for this signature in database
GPG key ID: 665806380871D640
6 changed files with 23 additions and 6 deletions

View file

@ -315,6 +315,12 @@ void Events::listener_mapWindow(void* owner, void* data) {
} catch (std::exception& e) { Debug::log(ERR, "Rule \"{}\" failed with: {}", r->m_rule, e.what()); }
break;
}
case CWindowRule::RULE_NOCLOSEFOR: {
const CVarList VARS(r->m_rule, 0, ' ');
try {
PWINDOW->m_closeableSince = Time::steadyNow() + std::chrono::milliseconds(std::stoull(VARS[1]));
} catch (std::exception& e) { Debug::log(ERR, "Rule \"{}\" failed with: {}", r->m_rule, e.what()); }
}
default: break;
}