diff options
| author | Vaxry <vaxry@vaxry.net> | 2025-04-16 01:37:48 +0100 |
|---|---|---|
| committer | Vaxry <vaxry@vaxry.net> | 2025-04-16 01:37:48 +0100 |
| commit | 877fb5b93ada9b25b4d2f5ca5f69370fa345f1ac (patch) | |
| tree | 5b52ad19c695590ae50c7adae06b8e3aeccf34c1 /src/protocols/core/Seat.cpp | |
| parent | 0e521788bcc414c9cf81648d3167757d83deb60f (diff) | |
time: move to stl's clocks and move timer
Diffstat (limited to 'src/protocols/core/Seat.cpp')
| -rw-r--r-- | src/protocols/core/Seat.cpp | 5 |
1 files changed, 2 insertions, 3 deletions
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 <algorithm> @@ -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); } } |
