diff options
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); } } |
