From ce821294e21978cadf4c3facbeec421b245ea2c9 Mon Sep 17 00:00:00 2001 From: davc0n Date: Fri, 2 May 2025 17:07:20 +0200 Subject: managers: refactor class member vars (#10242) --- src/protocols/PrimarySelection.cpp | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) (limited to 'src/protocols/PrimarySelection.cpp') diff --git a/src/protocols/PrimarySelection.cpp b/src/protocols/PrimarySelection.cpp index 620f262e..2cd610ec 100644 --- a/src/protocols/PrimarySelection.cpp +++ b/src/protocols/PrimarySelection.cpp @@ -228,7 +228,7 @@ void CPrimarySelectionProtocol::bindManager(wl_client* client, void* data, uint3 // we need to do it here because protocols come before seatMgr if (!listeners.onPointerFocusChange) - listeners.onPointerFocusChange = g_pSeatManager->events.pointerFocusChange.registerListener([this](std::any d) { this->onPointerFocus(); }); + listeners.onPointerFocusChange = g_pSeatManager->m_events.pointerFocusChange.registerListener([this](std::any d) { this->onPointerFocus(); }); } void CPrimarySelectionProtocol::destroyResource(CPrimarySelectionManager* resource) { @@ -279,10 +279,10 @@ void CPrimarySelectionProtocol::setSelection(SP source) { if (!source) { LOGM(LOG, "resetting selection"); - if (!g_pSeatManager->state.pointerFocusResource) + if (!g_pSeatManager->m_state.pointerFocusResource) return; - auto DESTDEVICE = dataDeviceForClient(g_pSeatManager->state.pointerFocusResource->client()); + auto DESTDEVICE = dataDeviceForClient(g_pSeatManager->m_state.pointerFocusResource->client()); if (DESTDEVICE) sendSelectionToDevice(DESTDEVICE, nullptr); @@ -291,10 +291,10 @@ void CPrimarySelectionProtocol::setSelection(SP source) { LOGM(LOG, "New selection for data source {:x}", (uintptr_t)source.get()); - if (!g_pSeatManager->state.pointerFocusResource) + if (!g_pSeatManager->m_state.pointerFocusResource) return; - auto DESTDEVICE = dataDeviceForClient(g_pSeatManager->state.pointerFocusResource->client()); + auto DESTDEVICE = dataDeviceForClient(g_pSeatManager->m_state.pointerFocusResource->client()); if (!DESTDEVICE) { LOGM(LOG, "CWLDataDeviceProtocol::setSelection: cannot send selection to a client without a data_device"); @@ -305,17 +305,17 @@ void CPrimarySelectionProtocol::setSelection(SP source) { } void CPrimarySelectionProtocol::updateSelection() { - if (!g_pSeatManager->state.pointerFocusResource) + if (!g_pSeatManager->m_state.pointerFocusResource) return; - auto DESTDEVICE = dataDeviceForClient(g_pSeatManager->state.pointerFocusResource->client()); + auto DESTDEVICE = dataDeviceForClient(g_pSeatManager->m_state.pointerFocusResource->client()); if (!DESTDEVICE) { LOGM(LOG, "CPrimarySelectionProtocol::updateSelection: cannot send selection to a client without a data_device"); return; } - sendSelectionToDevice(DESTDEVICE, g_pSeatManager->selection.currentPrimarySelection.lock()); + sendSelectionToDevice(DESTDEVICE, g_pSeatManager->m_selection.currentPrimarySelection.lock()); } void CPrimarySelectionProtocol::onPointerFocus() { -- cgit v1.2.3