diff options
| author | Vaxry <vaxry@vaxry.net> | 2024-05-10 18:27:57 +0100 |
|---|---|---|
| committer | Vaxry <43317083+vaxerski@users.noreply.github.com> | 2024-05-14 23:02:24 +0100 |
| commit | 121d3a72137d4780602cf245704615f63357ea22 (patch) | |
| tree | b25c8a3ee7b239006281f0e00110d1c324b8cedc /src/managers/input/Touch.cpp | |
| parent | 4cdddcfe466cb21db81af0ac39e51cc15f574da9 (diff) | |
wl_seat: move to hyprland impl
Diffstat (limited to 'src/managers/input/Touch.cpp')
| -rw-r--r-- | src/managers/input/Touch.cpp | 14 |
1 files changed, 6 insertions, 8 deletions
diff --git a/src/managers/input/Touch.cpp b/src/managers/input/Touch.cpp index 4a6484c2..7748813b 100644 --- a/src/managers/input/Touch.cpp +++ b/src/managers/input/Touch.cpp @@ -3,6 +3,7 @@ #include "../../config/ConfigValue.hpp" #include "../../protocols/IdleNotify.hpp" #include "../../devices/ITouch.hpp" +#include "../SeatManager.hpp" void CInputManager::onTouchDown(ITouch::SDownEvent e) { static auto PSWIPETOUCH = CConfigValue<Hyprlang::INT>("gestures:workspace_swipe_touch"); @@ -76,7 +77,7 @@ void CInputManager::onTouchDown(ITouch::SDownEvent e) { } else return; // oops, nothing found. - wlr_seat_touch_notify_down(g_pCompositor->m_sSeat.seat, m_sTouchData.touchFocusSurface, e.timeMs, e.touchID, local.x, local.y); + g_pSeatManager->sendTouchDown(m_sTouchData.touchFocusSurface, e.timeMs, e.touchID, local); PROTO::idle->onActivity(); } @@ -90,9 +91,8 @@ void CInputManager::onTouchUp(ITouch::SUpEvent e) { return; } - if (m_sTouchData.touchFocusSurface) { - wlr_seat_touch_notify_up(g_pCompositor->m_sSeat.seat, e.timeMs, e.touchID); - } + if (m_sTouchData.touchFocusSurface) + g_pSeatManager->sendTouchUp(e.timeMs, e.touchID); } void CInputManager::onTouchMove(ITouch::SMotionEvent e) { @@ -131,8 +131,7 @@ void CInputManager::onTouchMove(ITouch::SMotionEvent e) { if (m_sTouchData.touchFocusWindow->m_bIsX11) local = local * m_sTouchData.touchFocusWindow->m_fX11SurfaceScaledBy; - wlr_seat_touch_notify_motion(g_pCompositor->m_sSeat.seat, e.timeMs, e.touchID, local.x, local.y); - // wlr_seat_pointer_notify_motion(g_pCompositor->m_sSeat.seat, e->time_msec, local.x, local.y); + g_pSeatManager->sendTouchMotion(e.timeMs, e.touchID, local); } else if (!m_sTouchData.touchFocusLS.expired()) { const auto PMONITOR = g_pCompositor->getMonitorFromID(m_sTouchData.touchFocusLS->monitorID); @@ -140,7 +139,6 @@ void CInputManager::onTouchMove(ITouch::SMotionEvent e) { const auto local = g_pInputManager->getMouseCoordsInternal() - m_sTouchData.touchSurfaceOrigin; - wlr_seat_touch_notify_motion(g_pCompositor->m_sSeat.seat, e.timeMs, e.touchID, local.x, local.y); - // wlr_seat_pointer_notify_motion(g_pCompositor->m_sSeat.seat, e->time_msec, local.x, local.y); + g_pSeatManager->sendTouchMotion(e.timeMs, e.touchID, local); } } |
