core: fix libc++ compatibility (#195)

* core: add missing header

libc++ compatibility #193

* input-field: fix wrong clock type
This commit is contained in:
Maximilian Seidler 2024-03-15 15:43:29 +01:00 committed by GitHub
parent 56e7bc1e51
commit e040c56ad2
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 2 additions and 1 deletions

View file

@ -16,6 +16,7 @@
#include <xf86drm.h>
#include <filesystem>
#include <fstream>
#include <algorithm>
CHyprlock::CHyprlock(const std::string& wlDisplay, const bool immediate) {
m_sWaylandState.display = wl_display_connect(wlDisplay.empty() ? nullptr : wlDisplay.c_str());

View file

@ -419,7 +419,7 @@ void CPasswordInputField::updateOuter() {
const auto MULTI = outerColor.transitionMs == 0 ?
1.0 :
std::clamp(std::chrono::duration_cast<std::chrono::milliseconds>(std::chrono::high_resolution_clock::now() - TIMER).count() / (double)outerColor.transitionMs, 0.02, 0.5);
std::clamp(std::chrono::duration_cast<std::chrono::milliseconds>(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) {