diff options
| author | vaxerski <43317083+vaxerski@users.noreply.github.com> | 2023-03-12 13:46:38 +0000 |
|---|---|---|
| committer | vaxerski <43317083+vaxerski@users.noreply.github.com> | 2023-03-12 13:46:38 +0000 |
| commit | 146d231ec5ea9059a64e34caeba06e790991e81a (patch) | |
| tree | 7058bbc08f8073de0360227433ed8907315f3a5f /src/managers/input/InputManager.cpp | |
| parent | 71ef1bde7e45f94ceaab925ae065f32f91510890 (diff) | |
config: add key_press_enables_dpms
Diffstat (limited to 'src/managers/input/InputManager.cpp')
| -rw-r--r-- | src/managers/input/InputManager.cpp | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/src/managers/input/InputManager.cpp b/src/managers/input/InputManager.cpp index bac3b83e..5b59f7f1 100644 --- a/src/managers/input/InputManager.cpp +++ b/src/managers/input/InputManager.cpp @@ -963,6 +963,12 @@ void CInputManager::onKeyboardKey(wlr_keyboard_key_event* e, SKeyboard* pKeyboar if (!pKeyboard->enabled) return; + static auto* const PDPMS = &g_pConfigManager->getConfigValuePtr("key_press_enables_dpms")->intValue; + if (*PDPMS && g_pCompositor->m_bDPMSStateON) { + // enable dpms + g_pKeybindManager->dpms("on"); + } + bool passEvent = g_pKeybindManager->onKeyEvent(e, pKeyboard); wlr_idle_notify_activity(g_pCompositor->m_sWLRIdle, g_pCompositor->m_sSeat.seat); |
