From e040c56ad294807c4d86adad08678e357a6eefa9 Mon Sep 17 00:00:00 2001 From: Maximilian Seidler <78690852+PaideiaDilemma@users.noreply.github.com> Date: Fri, 15 Mar 2024 15:43:29 +0100 Subject: [PATCH] core: fix libc++ compatibility (#195) * core: add missing header libc++ compatibility #193 * input-field: fix wrong clock type --- src/core/hyprlock.cpp | 1 + src/renderer/widgets/PasswordInputField.cpp | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/src/core/hyprlock.cpp b/src/core/hyprlock.cpp index 8ed0bf5..38937de 100644 --- a/src/core/hyprlock.cpp +++ b/src/core/hyprlock.cpp @@ -16,6 +16,7 @@ #include #include #include +#include CHyprlock::CHyprlock(const std::string& wlDisplay, const bool immediate) { m_sWaylandState.display = wl_display_connect(wlDisplay.empty() ? nullptr : wlDisplay.c_str()); diff --git a/src/renderer/widgets/PasswordInputField.cpp b/src/renderer/widgets/PasswordInputField.cpp index 4aad26c..5230bae 100644 --- a/src/renderer/widgets/PasswordInputField.cpp +++ b/src/renderer/widgets/PasswordInputField.cpp @@ -419,7 +419,7 @@ void CPasswordInputField::updateOuter() { const auto MULTI = outerColor.transitionMs == 0 ? 1.0 : - std::clamp(std::chrono::duration_cast(std::chrono::high_resolution_clock::now() - TIMER).count() / (double)outerColor.transitionMs, 0.02, 0.5); + std::clamp(std::chrono::duration_cast(std::chrono::system_clock::now() - TIMER).count() / (double)outerColor.transitionMs, 0.02, 0.5); const auto DELTA = TARGET - SOURCE; if (outerColor.main.r != TARGET.r) {