summaryrefslogtreecommitdiff
path: root/src/managers/input/InputManager.cpp
diff options
context:
space:
mode:
authorvaxerski <43317083+vaxerski@users.noreply.github.com>2022-07-31 15:46:42 +0200
committervaxerski <43317083+vaxerski@users.noreply.github.com>2022-07-31 15:46:42 +0200
commita1d1ec4c4696b5e44c7d7135c4191aa795811bee (patch)
tree351aeeba6539f61a7138f5d5d7921555de1b87eb /src/managers/input/InputManager.cpp
parentd9687c93ee9fe627bcda3a01b80ecf9faf9ddc65 (diff)
added misc:mouse_move_enables_dpms
Diffstat (limited to 'src/managers/input/InputManager.cpp')
-rw-r--r--src/managers/input/InputManager.cpp6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/managers/input/InputManager.cpp b/src/managers/input/InputManager.cpp
index 21c3be68..29b16c3b 100644
--- a/src/managers/input/InputManager.cpp
+++ b/src/managers/input/InputManager.cpp
@@ -29,6 +29,7 @@ void CInputManager::onMouseWarp(wlr_pointer_motion_absolute_event* e) {
void CInputManager::mouseMoveUnified(uint32_t time, bool refocus) {
static auto *const PFOLLOWMOUSE = &g_pConfigManager->getConfigValuePtr("input:follow_mouse")->intValue;
+ static auto* const PMOUSEDPMS = &g_pConfigManager->getConfigValuePtr("misc:mouse_move_enables_dpms")->intValue;
if (!g_pCompositor->m_bReadyToProcess)
return;
@@ -41,6 +42,11 @@ void CInputManager::mouseMoveUnified(uint32_t time, bool refocus) {
if (g_pCompositor->m_sSeat.mouse->virt)
return; // don't refocus on virt
+ if (!g_pCompositor->m_bDPMSStateON && *PMOUSEDPMS) {
+ // enable dpms
+ g_pKeybindManager->dpms("on");
+ }
+
Vector2D mouseCoords = getMouseCoordsInternal();
const auto MOUSECOORDSFLOORED = mouseCoords.floor();