summaryrefslogtreecommitdiff
path: root/src/managers/input/InputManager.cpp
diff options
context:
space:
mode:
authorvaxerski <43317083+vaxerski@users.noreply.github.com>2022-06-24 23:27:02 +0200
committervaxerski <43317083+vaxerski@users.noreply.github.com>2022-06-24 23:27:02 +0200
commit72c86b99eb87b23c11fdc795ec6f3668f283b95c (patch)
tree2d612e505a465b29f2d95a500d77a2f91485ea50 /src/managers/input/InputManager.cpp
parenteb13be1240dfe83b42e26621069aeb09ecf39b66 (diff)
added general:cursor_inactive_timeout
Diffstat (limited to 'src/managers/input/InputManager.cpp')
-rw-r--r--src/managers/input/InputManager.cpp8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/managers/input/InputManager.cpp b/src/managers/input/InputManager.cpp
index 46d6338e..d58a9986 100644
--- a/src/managers/input/InputManager.cpp
+++ b/src/managers/input/InputManager.cpp
@@ -14,12 +14,16 @@ void CInputManager::onMouseMoved(wlr_pointer_motion_event* e) {
wlr_cursor_move(g_pCompositor->m_sWLRCursor, &e->pointer->base, DELTA.x * sensitivity, DELTA.y * sensitivity);
mouseMoveUnified(e->time_msec);
+
+ m_tmrLastCursorMovement.reset();
}
void CInputManager::onMouseWarp(wlr_pointer_motion_absolute_event* e) {
wlr_cursor_warp_absolute(g_pCompositor->m_sWLRCursor, &e->pointer->base, e->x, e->y);
mouseMoveUnified(e->time_msec);
+
+ m_tmrLastCursorMovement.reset();
}
void CInputManager::mouseMoveUnified(uint32_t time, bool refocus) {
@@ -205,6 +209,8 @@ void CInputManager::mouseMoveUnified(uint32_t time, bool refocus) {
void CInputManager::onMouseButton(wlr_pointer_button_event* e) {
wlr_idle_notify_activity(g_pCompositor->m_sWLRIdle, g_pCompositor->m_sSeat.seat);
+ m_tmrLastCursorMovement.reset();
+
const auto PKEYBOARD = wlr_seat_get_keyboard(g_pCompositor->m_sSeat.seat);
if (!PKEYBOARD) { // ???
@@ -383,6 +389,8 @@ void CInputManager::newMouse(wlr_input_device* mouse) {
g_pCompositor->m_sSeat.mouse = PMOUSE;
+ m_tmrLastCursorMovement.reset();
+
Debug::log(LOG, "New mouse created, pointer WLR: %x", mouse);
}