diff --git a/src/core/LockSurface.cpp b/src/core/LockSurface.cpp index af2563c..695ad21 100644 --- a/src/core/LockSurface.cpp +++ b/src/core/LockSurface.cpp @@ -31,6 +31,8 @@ CSessionLockSurface::~CSessionLockSurface() { wl_egl_window_destroy(eglWindow); ext_session_lock_surface_v1_destroy(lockSurface); wl_surface_destroy(surface); + if (frameCallback) + wl_callback_destroy(frameCallback); } CSessionLockSurface::CSessionLockSurface(COutput* output) : output(output) { @@ -116,6 +118,10 @@ void CSessionLockSurface::configure(const Vector2D& size_, uint32_t serial_) { static void handleDone(void* data, wl_callback* wl_callback, uint32_t callback_data) { const auto PSURF = (CSessionLockSurface*)data; + + if (g_pHyprlock->m_bTerminate) + return; + PSURF->onCallback(); } diff --git a/src/core/hyprlock.cpp b/src/core/hyprlock.cpp index 8fc9e31..80c0762 100644 --- a/src/core/hyprlock.cpp +++ b/src/core/hyprlock.cpp @@ -239,6 +239,8 @@ void CHyprlock::run() { m_sLoopState.timerCV.notify_all(); g_pRenderer->asyncResourceGatherer->notify(); + m_vOutputs.clear(); + wl_display_disconnect(m_sWaylandState.display); Debug::log(LOG, "Reached the end, exiting");