From 877fb5b93ada9b25b4d2f5ca5f69370fa345f1ac Mon Sep 17 00:00:00 2001 From: Vaxry Date: Wed, 16 Apr 2025 01:37:48 +0100 Subject: time: move to stl's clocks and move timer --- src/protocols/core/Seat.cpp | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'src/protocols/core/Seat.cpp') diff --git a/src/protocols/core/Seat.cpp b/src/protocols/core/Seat.cpp index f6eee6e1..5faabedc 100644 --- a/src/protocols/core/Seat.cpp +++ b/src/protocols/core/Seat.cpp @@ -4,6 +4,7 @@ #include "../../devices/IKeyboard.hpp" #include "../../devices/IHID.hpp" #include "../../managers/SeatManager.hpp" +#include "../../helpers/time/Time.hpp" #include "../../config/ConfigValue.hpp" #include @@ -174,10 +175,8 @@ void CWLPointerResource::sendLeave() { // release all buttons unless we have a dnd going on in which case // the events shall be lost. if (!PROTO::data->dndActive()) { - timespec now; - clock_gettime(CLOCK_MONOTONIC, &now); for (auto const& b : pressedButtons) { - sendButton(now.tv_sec * 1000 + now.tv_nsec / 1000000, b, WL_POINTER_BUTTON_STATE_RELEASED); + sendButton(Time::millis(Time::steadyNow()), b, WL_POINTER_BUTTON_STATE_RELEASED); } } -- cgit v1.2.3