diff options
| author | davc0n <dconti.dev@gmail.com> | 2025-05-02 17:07:20 +0200 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2025-05-02 17:07:20 +0200 |
| commit | ce821294e21978cadf4c3facbeec421b245ea2c9 (patch) | |
| tree | aa90efb5251160cd1ed37fc9443f596f80f6dd96 /src/protocols/PointerGestures.cpp | |
| parent | 6f174a9e0892aab5c4c17a7da9be7f92bcdcebec (diff) | |
managers: refactor class member vars (#10242)
Diffstat (limited to 'src/protocols/PointerGestures.cpp')
| -rw-r--r-- | src/protocols/PointerGestures.cpp | 50 |
1 files changed, 25 insertions, 25 deletions
diff --git a/src/protocols/PointerGestures.cpp b/src/protocols/PointerGestures.cpp index 8de73ffa..e6c50dad 100644 --- a/src/protocols/PointerGestures.cpp +++ b/src/protocols/PointerGestures.cpp @@ -103,26 +103,26 @@ void CPointerGesturesProtocol::onGetHoldGesture(CZwpPointerGesturesV1* pMgr, uin } void CPointerGesturesProtocol::swipeBegin(uint32_t timeMs, uint32_t fingers) { - if (!g_pSeatManager->state.pointerFocusResource) + if (!g_pSeatManager->m_state.pointerFocusResource) return; - const auto FOCUSEDCLIENT = g_pSeatManager->state.pointerFocusResource->client(); + const auto FOCUSEDCLIENT = g_pSeatManager->m_state.pointerFocusResource->client(); - const auto SERIAL = g_pSeatManager->nextSerial(g_pSeatManager->state.pointerFocusResource.lock()); + const auto SERIAL = g_pSeatManager->nextSerial(g_pSeatManager->m_state.pointerFocusResource.lock()); for (auto const& sw : m_vSwipes) { if (sw->resource->client() != FOCUSEDCLIENT) continue; - sw->resource->sendBegin(SERIAL, timeMs, g_pSeatManager->state.pointerFocus->getResource()->resource(), fingers); + sw->resource->sendBegin(SERIAL, timeMs, g_pSeatManager->m_state.pointerFocus->getResource()->resource(), fingers); } } void CPointerGesturesProtocol::swipeUpdate(uint32_t timeMs, const Vector2D& delta) { - if (!g_pSeatManager->state.pointerFocusResource) + if (!g_pSeatManager->m_state.pointerFocusResource) return; - const auto FOCUSEDCLIENT = g_pSeatManager->state.pointerFocusResource->client(); + const auto FOCUSEDCLIENT = g_pSeatManager->m_state.pointerFocusResource->client(); for (auto const& sw : m_vSwipes) { if (sw->resource->client() != FOCUSEDCLIENT) @@ -133,12 +133,12 @@ void CPointerGesturesProtocol::swipeUpdate(uint32_t timeMs, const Vector2D& delt } void CPointerGesturesProtocol::swipeEnd(uint32_t timeMs, bool cancelled) { - if (!g_pSeatManager->state.pointerFocusResource) + if (!g_pSeatManager->m_state.pointerFocusResource) return; - const auto FOCUSEDCLIENT = g_pSeatManager->state.pointerFocusResource->client(); + const auto FOCUSEDCLIENT = g_pSeatManager->m_state.pointerFocusResource->client(); - const auto SERIAL = g_pSeatManager->nextSerial(g_pSeatManager->state.pointerFocusResource.lock()); + const auto SERIAL = g_pSeatManager->nextSerial(g_pSeatManager->m_state.pointerFocusResource.lock()); for (auto const& sw : m_vSwipes) { if (sw->resource->client() != FOCUSEDCLIENT) @@ -149,26 +149,26 @@ void CPointerGesturesProtocol::swipeEnd(uint32_t timeMs, bool cancelled) { } void CPointerGesturesProtocol::pinchBegin(uint32_t timeMs, uint32_t fingers) { - if (!g_pSeatManager->state.pointerFocusResource) + if (!g_pSeatManager->m_state.pointerFocusResource) return; - const auto FOCUSEDCLIENT = g_pSeatManager->state.pointerFocusResource->client(); + const auto FOCUSEDCLIENT = g_pSeatManager->m_state.pointerFocusResource->client(); - const auto SERIAL = g_pSeatManager->nextSerial(g_pSeatManager->state.pointerFocusResource.lock()); + const auto SERIAL = g_pSeatManager->nextSerial(g_pSeatManager->m_state.pointerFocusResource.lock()); for (auto const& sw : m_vPinches) { if (sw->resource->client() != FOCUSEDCLIENT) continue; - sw->resource->sendBegin(SERIAL, timeMs, g_pSeatManager->state.pointerFocus->getResource()->resource(), fingers); + sw->resource->sendBegin(SERIAL, timeMs, g_pSeatManager->m_state.pointerFocus->getResource()->resource(), fingers); } } void CPointerGesturesProtocol::pinchUpdate(uint32_t timeMs, const Vector2D& delta, double scale, double rotation) { - if (!g_pSeatManager->state.pointerFocusResource) + if (!g_pSeatManager->m_state.pointerFocusResource) return; - const auto FOCUSEDCLIENT = g_pSeatManager->state.pointerFocusResource->client(); + const auto FOCUSEDCLIENT = g_pSeatManager->m_state.pointerFocusResource->client(); for (auto const& sw : m_vPinches) { if (sw->resource->client() != FOCUSEDCLIENT) @@ -179,12 +179,12 @@ void CPointerGesturesProtocol::pinchUpdate(uint32_t timeMs, const Vector2D& delt } void CPointerGesturesProtocol::pinchEnd(uint32_t timeMs, bool cancelled) { - if (!g_pSeatManager->state.pointerFocusResource) + if (!g_pSeatManager->m_state.pointerFocusResource) return; - const auto FOCUSEDCLIENT = g_pSeatManager->state.pointerFocusResource->client(); + const auto FOCUSEDCLIENT = g_pSeatManager->m_state.pointerFocusResource->client(); - const auto SERIAL = g_pSeatManager->nextSerial(g_pSeatManager->state.pointerFocusResource.lock()); + const auto SERIAL = g_pSeatManager->nextSerial(g_pSeatManager->m_state.pointerFocusResource.lock()); for (auto const& sw : m_vPinches) { if (sw->resource->client() != FOCUSEDCLIENT) @@ -195,28 +195,28 @@ void CPointerGesturesProtocol::pinchEnd(uint32_t timeMs, bool cancelled) { } void CPointerGesturesProtocol::holdBegin(uint32_t timeMs, uint32_t fingers) { - if (!g_pSeatManager->state.pointerFocusResource) + if (!g_pSeatManager->m_state.pointerFocusResource) return; - const auto FOCUSEDCLIENT = g_pSeatManager->state.pointerFocusResource->client(); + const auto FOCUSEDCLIENT = g_pSeatManager->m_state.pointerFocusResource->client(); - const auto SERIAL = g_pSeatManager->nextSerial(g_pSeatManager->state.pointerFocusResource.lock()); + const auto SERIAL = g_pSeatManager->nextSerial(g_pSeatManager->m_state.pointerFocusResource.lock()); for (auto const& sw : m_vHolds) { if (sw->resource->client() != FOCUSEDCLIENT) continue; - sw->resource->sendBegin(SERIAL, timeMs, g_pSeatManager->state.pointerFocus->getResource()->resource(), fingers); + sw->resource->sendBegin(SERIAL, timeMs, g_pSeatManager->m_state.pointerFocus->getResource()->resource(), fingers); } } void CPointerGesturesProtocol::holdEnd(uint32_t timeMs, bool cancelled) { - if (!g_pSeatManager->state.pointerFocusResource) + if (!g_pSeatManager->m_state.pointerFocusResource) return; - const auto FOCUSEDCLIENT = g_pSeatManager->state.pointerFocusResource->client(); + const auto FOCUSEDCLIENT = g_pSeatManager->m_state.pointerFocusResource->client(); - const auto SERIAL = g_pSeatManager->nextSerial(g_pSeatManager->state.pointerFocusResource.lock()); + const auto SERIAL = g_pSeatManager->nextSerial(g_pSeatManager->m_state.pointerFocusResource.lock()); for (auto const& sw : m_vHolds) { if (sw->resource->client() != FOCUSEDCLIENT) |
