From f2b03e9679bc1a091fecffd98b50a4179b5c7d43 Mon Sep 17 00:00:00 2001 From: Vaxry Date: Mon, 29 Apr 2024 17:42:07 +0100 Subject: ext-idle-notify: move to new impl --- src/managers/input/InputManager.cpp | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) (limited to 'src/managers/input/InputManager.cpp') diff --git a/src/managers/input/InputManager.cpp b/src/managers/input/InputManager.cpp index adfa5029..47dc2bf6 100644 --- a/src/managers/input/InputManager.cpp +++ b/src/managers/input/InputManager.cpp @@ -8,6 +8,7 @@ #include "../../protocols/IdleInhibit.hpp" #include "../../protocols/RelativePointer.hpp" #include "../../protocols/PointerConstraints.hpp" +#include "../../protocols/IdleNotify.hpp" CInputManager::CInputManager() { m_sListeners.setCursorShape = PROTO::cursorShape->events.setShape.registerListener([this](std::any data) { @@ -144,7 +145,7 @@ void CInputManager::mouseMoveUnified(uint32_t time, bool refocus) { EMIT_HOOK_EVENT_CANCELLABLE("mouseMove", MOUSECOORDSFLOORED); if (time) - g_pCompositor->notifyIdleActivity(); + PROTO::idle->onActivity(); m_vLastCursorPosFloored = MOUSECOORDSFLOORED; @@ -480,7 +481,7 @@ void CInputManager::mouseMoveUnified(uint32_t time, bool refocus) { void CInputManager::onMouseButton(wlr_pointer_button_event* e) { EMIT_HOOK_EVENT_CANCELLABLE("mouseButton", e); - g_pCompositor->notifyIdleActivity(); + PROTO::idle->onActivity(); m_tmrLastCursorMovement.reset(); @@ -705,7 +706,7 @@ void CInputManager::onMouseWheel(wlr_pointer_axis_event* e) { bool passEvent = g_pKeybindManager->onAxisEvent(e); - g_pCompositor->notifyIdleActivity(); + PROTO::idle->onActivity(); if (!passEvent) return; @@ -1216,7 +1217,7 @@ void CInputManager::onKeyboardKey(wlr_keyboard_key_event* e, SKeyboard* pKeyboar bool passEvent = g_pKeybindManager->onKeyEvent(e, pKeyboard); - g_pCompositor->notifyIdleActivity(); + PROTO::idle->onActivity(); if (passEvent) { -- cgit v1.2.3