diff --git a/src/managers/SeatManager.cpp b/src/managers/SeatManager.cpp index b40d6cad66f..665805f6626 100644 --- a/src/managers/SeatManager.cpp +++ b/src/managers/SeatManager.cpp @@ -332,8 +332,10 @@ void CSeatManager::sendPointerAxis(uint32_t timeMs, wl_pointer_axis axis, double p->sendAxisRelativeDirection(axis, relative); if (source == 0) { - p->sendAxisValue120(axis, value120); - p->sendAxisDiscrete(axis, discrete); + if (p->version() >= 8) + p->sendAxisValue120(axis, value120); + else + p->sendAxisDiscrete(axis, discrete); } else if (value == 0) p->sendAxisStop(timeMs, axis); } diff --git a/src/protocols/core/Seat.cpp b/src/protocols/core/Seat.cpp index d95e0e1282b..7c31b67c4de 100644 --- a/src/protocols/core/Seat.cpp +++ b/src/protocols/core/Seat.cpp @@ -136,6 +136,10 @@ CWLPointerResource::CWLPointerResource(SP resource_, SPstate.pointerFocus.lock(), {-1, -1} /* Coords don't really matter that much, they will be updated next move */); } +int CWLPointerResource::version() { + return resource->version(); +} + bool CWLPointerResource::good() { return resource->resource(); } diff --git a/src/protocols/core/Seat.hpp b/src/protocols/core/Seat.hpp index 1b43dd04b15..b5670237c61 100644 --- a/src/protocols/core/Seat.hpp +++ b/src/protocols/core/Seat.hpp @@ -73,6 +73,7 @@ class CWLPointerResource { CWLPointerResource(SP resource_, SP owner_); bool good(); + int version(); void sendEnter(SP surface, const Vector2D& local); void sendLeave(); void sendMotion(uint32_t timeMs, const Vector2D& local);