diff options
| author | vaxerski <43317083+vaxerski@users.noreply.github.com> | 2022-10-31 12:26:07 +0000 |
|---|---|---|
| committer | vaxerski <43317083+vaxerski@users.noreply.github.com> | 2022-10-31 12:26:07 +0000 |
| commit | a69fd21a1ac90c24cee659595d62329f8638d632 (patch) | |
| tree | c1c1302b9a732f52607df7c0c6f43525caf3a9f9 /src/events/Windows.cpp | |
| parent | b6e33830af1a89a2cfbef446de1fc37e8a2b40e3 (diff) | |
Add an idleinhibit windowrule
Diffstat (limited to 'src/events/Windows.cpp')
| -rw-r--r-- | src/events/Windows.cpp | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/src/events/Windows.cpp b/src/events/Windows.cpp index 07835543..034a1005 100644 --- a/src/events/Windows.cpp +++ b/src/events/Windows.cpp @@ -201,6 +201,20 @@ void Events::listener_mapWindow(void* owner, void* data) { } else if (r.szRule.find("animation") == 0) { auto STYLE = r.szRule.substr(r.szRule.find_first_of(' ') + 1); PWINDOW->m_sAdditionalConfigData.animationStyle = STYLE; + } else if (r.szRule.find("idleinhibit") == 0) { + auto IDLERULE = r.szRule.substr(r.szRule.find_first_of(' ') + 1); + + if (IDLERULE == "none") { + PWINDOW->m_eIdleInhibitMode = IDLEINHIBIT_NONE; + } else if (IDLERULE == "always") { + PWINDOW->m_eIdleInhibitMode = IDLEINHIBIT_ALWAYS; + } else if (IDLERULE == "focus") { + PWINDOW->m_eIdleInhibitMode = IDLEINHIBIT_FOCUS; + } else if (IDLERULE == "fullscreen") { + PWINDOW->m_eIdleInhibitMode = IDLEINHIBIT_FULLSCREEN; + } else { + Debug::log(ERR, "Rule idleinhibit: unknown mode %s", IDLERULE.c_str()); + } } } |
