mirror of
https://github.com/hyprwm/Hyprland.git
synced 2025-08-05 22:51:58 -07:00
managers: refactor class member vars (#10242)
This commit is contained in:
@@ -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)
|
||||
|
Reference in New Issue
Block a user