summaryrefslogtreecommitdiff
path: root/src/protocols
diff options
context:
space:
mode:
Diffstat (limited to 'src/protocols')
-rw-r--r--src/protocols/core/Seat.cpp6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/protocols/core/Seat.cpp b/src/protocols/core/Seat.cpp
index 52015fd8..202010aa 100644
--- a/src/protocols/core/Seat.cpp
+++ b/src/protocols/core/Seat.cpp
@@ -137,8 +137,10 @@ CWLPointerResource::CWLPointerResource(SP<CWlPointer> resource_, SP<CWLSeatResou
g_pSeatManager->onSetCursor(m_owner.lock(), serial, surfResource, {hotX, hotY});
});
- if (g_pSeatManager->m_state.pointerFocus && g_pSeatManager->m_state.pointerFocus->client() == m_resource->client())
- sendEnter(g_pSeatManager->m_state.pointerFocus.lock(), {-1, -1} /* Coords don't really matter that much, they will be updated next move */);
+ auto surface = g_pSeatManager->m_state.pointerFocus.lock();
+
+ if (surface && surface->client() == m_resource->client())
+ sendEnter(surface, {-1, -1});
}
CWLPointerResource::~CWLPointerResource() {