diff --git a/src/managers/PointerManager.cpp b/src/managers/PointerManager.cpp index 1fd770ba..519b6310 100644 --- a/src/managers/PointerManager.cpp +++ b/src/managers/PointerManager.cpp @@ -702,8 +702,7 @@ void CPointerManager::move(const Vector2D& deltaLogical) { const auto oldPos = pointerPos; auto newPos = oldPos + Vector2D{std::isnan(deltaLogical.x) ? 0.0 : deltaLogical.x, std::isnan(deltaLogical.y) ? 0.0 : deltaLogical.y}; - - PROTO::inputCapture->sendAbsoluteMotion(newPos, deltaLogical); + PROTO::inputCapture->sendMotion(newPos, deltaLogical); if (PROTO::inputCapture->isCaptured()) return; diff --git a/src/protocols/InputCapture.cpp b/src/protocols/InputCapture.cpp index e8ac910a..2fa99ac2 100644 --- a/src/protocols/InputCapture.cpp +++ b/src/protocols/InputCapture.cpp @@ -1,7 +1,7 @@ #include "InputCapture.hpp" CInputCaptureProtocol::CInputCaptureProtocol(const wl_interface* iface, const int& ver, const std::string& name) : IWaylandProtocol(iface, ver, name) { - active = false; + ; } void CInputCaptureProtocol::bindManager(wl_client* client, void* data, uint32_t ver, uint32_t id) { @@ -31,9 +31,9 @@ bool CInputCaptureProtocol::isCaptured() { return active; } -void CInputCaptureProtocol::sendAbsoluteMotion(const Vector2D& absolutePosition, const Vector2D& delta) { +void CInputCaptureProtocol::sendMotion(const Vector2D& absolutePosition, const Vector2D& delta) { for (const UP& manager : m_vManagers) { - manager->sendAbsoluteMotion(wl_fixed_from_double(absolutePosition.x), wl_fixed_from_double(absolutePosition.y), wl_fixed_from_double(delta.x), + manager->sendMotion(wl_fixed_from_double(absolutePosition.x), wl_fixed_from_double(absolutePosition.y), wl_fixed_from_double(delta.x), wl_fixed_from_double(delta.y)); } } diff --git a/src/protocols/InputCapture.hpp b/src/protocols/InputCapture.hpp index fafe81bb..efe69463 100644 --- a/src/protocols/InputCapture.hpp +++ b/src/protocols/InputCapture.hpp @@ -12,7 +12,7 @@ class CInputCaptureProtocol : public IWaylandProtocol { bool isCaptured(); // - void sendAbsoluteMotion(const Vector2D& absolutePosition, const Vector2D& delta); + void sendMotion(const Vector2D& absolutePosition, const Vector2D& delta); void sendKey(uint32_t keyCode, hyprlandInputCaptureManagerV1KeyState state); void sendButton(uint32_t button, hyprlandInputCaptureManagerV1ButtonState state); void sendAxis(hyprlandInputCaptureManagerV1Axis axis, double value); @@ -22,7 +22,7 @@ class CInputCaptureProtocol : public IWaylandProtocol { void sendFrame(); private: - bool active; + bool active = false; void onManagerResourceDestroy(wl_resource* res); void onCapture(CHyprlandInputCaptureManagerV1* pMgr);