From e57f146badd213e1fb89c17f881c1976e5f77295 Mon Sep 17 00:00:00 2001 From: Vaxry Date: Tue, 20 Feb 2024 03:18:17 +0000 Subject: [PATCH] core: fixup deadlock in timersThr exit cond --- src/core/hyprlock.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/core/hyprlock.cpp b/src/core/hyprlock.cpp index 36e9d1d..3b62e24 100644 --- a/src/core/hyprlock.cpp +++ b/src/core/hyprlock.cpp @@ -158,7 +158,7 @@ void CHyprlock::run() { float least = 10000; for (auto& t : m_vTimers) { - const auto TIME = t->leftMs(); + const auto TIME = std::clamp(t->leftMs(), 1.f, INFINITY); if (TIME < least) least = TIME; } @@ -238,7 +238,7 @@ void CHyprlock::run() { break; } - std::lock_guard lg2(m_sLoopState.timerRequestMutex); + m_sLoopState.timerEvent = true; m_sLoopState.timerCV.notify_all(); g_pRenderer->asyncResourceGatherer->notify();