From 3b42f6bee27030d9d150cb9c0823dd4bc5cc8e43 Mon Sep 17 00:00:00 2001 From: Vaxry Date: Mon, 30 Sep 2024 15:05:42 +0100 Subject: [PATCH] core: avoid crash in done callbacks fixes #89 --- src/helpers/LayerSurface.cpp | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/src/helpers/LayerSurface.cpp b/src/helpers/LayerSurface.cpp index 03cb3e4..f67d186 100644 --- a/src/helpers/LayerSurface.cpp +++ b/src/helpers/LayerSurface.cpp @@ -90,12 +90,7 @@ void CLayerSurface::sendFrame() { void CLayerSurface::markDirty() { frameCallback = makeShared(pSurface->sendFrame()); - frameCallback->setDone([this](CCWlCallback* r, uint32_t when) { - frameCallback.reset(); - - if (dirty || !rendered) - g_pHyprpicker->renderSurface(g_pHyprpicker->m_pLastSurface); - }); + frameCallback->setDone([this](CCWlCallback* r, uint32_t when) { onCallbackDone(this, when); }); pSurface->sendCommit(); dirty = true;