Skip to content

Commit 676e6df

Browse files
committed
fix: use proper pointer checks
1 parent f4770e0 commit 676e6df

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/GestureManager.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -272,7 +272,7 @@ void GestureManager::sendCancelEventsToWindows() {
272272

273273
for (const auto& touch : this->touchedResources.all()) {
274274
const auto t = touch.lock();
275-
if (t.impl_) { // FIXME: idk how to check weak pointer validity
275+
if (t.get()) {
276276
t->sendCancel();
277277
}
278278
}
@@ -366,7 +366,7 @@ bool GestureManager::onTouchUp(ITouch::SUpEvent ev) {
366366
if (**SEND_CANCEL) {
367367
const auto surface = g_pInputManager->m_sTouchData.touchFocusSurface;
368368

369-
if (!surface.impl_) {
369+
if (!surface.valid()) {
370370
return true;
371371
}
372372

@@ -376,7 +376,7 @@ bool GestureManager::onTouchUp(ITouch::SUpEvent ev) {
376376
}
377377

378378
SP<CWLSeatResource> seat = g_pSeatManager->seatResourceForClient(client);
379-
if (!seat.impl_) {
379+
if (!seat.get()) {
380380
return true;
381381
}
382382

0 commit comments

Comments
 (0)