diff options
| author | vaxerski <43317083+vaxerski@users.noreply.github.com> | 2022-05-28 17:48:01 +0200 |
|---|---|---|
| committer | vaxerski <43317083+vaxerski@users.noreply.github.com> | 2022-05-28 17:48:01 +0200 |
| commit | 7f1f14fe85f53fcf12849632d3f003f00cca7578 (patch) | |
| tree | d82738e23b95ec401e5ccc0c859203b61fe8cd42 /src/events/Windows.cpp | |
| parent | 7d442d48514e62a41e5bad0176adb8428dd112b3 (diff) | |
Added a rounding rule
Diffstat (limited to 'src/events/Windows.cpp')
| -rw-r--r-- | src/events/Windows.cpp | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/src/events/Windows.cpp b/src/events/Windows.cpp index 2133a37f..9d432b1d 100644 --- a/src/events/Windows.cpp +++ b/src/events/Windows.cpp @@ -101,6 +101,12 @@ void Events::listener_mapWindow(void* owner, void* data) { PWINDOW->m_bIsPseudotiled = true; } else if (r.szRule.find("nofocus") == 0) { PWINDOW->m_bNoFocus = true; + } else if (r.szRule.find("rounding") == 0) { + try { + PWINDOW->m_sAdditionalConfigData.rounding = std::stoi(r.szRule.substr(r.szRule.find_first_of(' ') + 1)); + } catch (std::exception& e) { + Debug::log(ERR, "Rounding rule \"%s\" failed with: %s", r.szRule.c_str(), e.what()); + } } else if (r.szRule.find("opacity") == 0) { try { PWINDOW->m_sSpecialRenderData.alpha = std::stof(r.szRule.substr(r.szRule.find_first_of(' ') + 1)); |
