added opacity rule

This commit is contained in:
vaxerski
2022-04-22 14:37:38 +02:00
parent a8e5e9c558
commit 94811485c9
4 changed files with 16 additions and 1 deletions

View File

@@ -86,6 +86,12 @@ void Events::listener_mapWindow(void* owner, void* data) {
PWINDOW->m_bIsFloating = false;
} else if (r.szRule.find("pseudo") == 0) {
PWINDOW->m_bIsPseudotiled = true;
} else if (r.szRule.find("opacity") == 0) {
try {
PWINDOW->m_sSpecialRenderData.alpha = std::stof(r.szRule.substr(r.szRule.find_first_of(' ') + 1));
} catch(std::exception& e) {
Debug::log(ERR, "Opacity rule \"%s\" failed with: %s", r.szRule.c_str(), e.what());
}
}
}