summaryrefslogtreecommitdiffstats
path: root/src/compositor/compositor_api/qwaylandtouch.cpp
diff options
context:
space:
mode:
authorPier Luigi Fiorini <pierluigi.fiorini@gmail.com>2015-11-25 19:41:14 +0100
committerPier Luigi Fiorini <pierluigi.fiorini@gmail.com>2015-11-28 16:48:49 +0000
commit68993c012b88df43b2cd75a8c8704092760f28c0 (patch)
tree3d5b97c0960472df2cd0e8aa8d224203ceb7679b /src/compositor/compositor_api/qwaylandtouch.cpp
parent02fa8b9ef89b6874effea8d219bcbba0319a263c (diff)
Add clients with the correct version
Wayland clients might implement an older interface version, in that case we don't want to send unsupported requests. To ensure that we pick the lower version between the one asked by the client and the one we actually implement on the server. Change-Id: I4865780505db171295897fc7f6567c6f88e598fa Reviewed-by: Paul Olav Tvete <paul.tvete@theqtcompany.com>
Diffstat (limited to 'src/compositor/compositor_api/qwaylandtouch.cpp')
-rw-r--r--src/compositor/compositor_api/qwaylandtouch.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/compositor/compositor_api/qwaylandtouch.cpp b/src/compositor/compositor_api/qwaylandtouch.cpp
index b2a0c6ef0..743730254 100644
--- a/src/compositor/compositor_api/qwaylandtouch.cpp
+++ b/src/compositor/compositor_api/qwaylandtouch.cpp
@@ -221,10 +221,10 @@ void QWaylandTouch::sendFullTouchEvent(QTouchEvent *event)
/*!
* \internal
*/
-void QWaylandTouch::addClient(QWaylandClient *client, uint32_t id)
+void QWaylandTouch::addClient(QWaylandClient *client, uint32_t id, uint32_t version)
{
Q_D(QWaylandTouch);
- d->add(client->client(), id, 3);
+ d->add(client->client(), id, qMin<uint32_t>(QtWaylandServer::wl_touch::interfaceVersion(), version));
}
/*!