summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/compositor/compositor_api/qwaylandinput.cpp6
-rw-r--r--src/compositor/compositor_api/qwaylandkeyboard.cpp4
-rw-r--r--src/compositor/compositor_api/qwaylandkeyboard.h2
-rw-r--r--src/compositor/compositor_api/qwaylandpointer.cpp4
-rw-r--r--src/compositor/compositor_api/qwaylandpointer.h2
-rw-r--r--src/compositor/compositor_api/qwaylandtouch.cpp4
-rw-r--r--src/compositor/compositor_api/qwaylandtouch.h2
7 files changed, 12 insertions, 12 deletions
diff --git a/src/compositor/compositor_api/qwaylandinput.cpp b/src/compositor/compositor_api/qwaylandinput.cpp
index 6cb476d8..be566c70 100644
--- a/src/compositor/compositor_api/qwaylandinput.cpp
+++ b/src/compositor/compositor_api/qwaylandinput.cpp
@@ -114,21 +114,21 @@ void QWaylandInputDevicePrivate::seat_bind_resource(wl_seat::Resource *resource)
void QWaylandInputDevicePrivate::seat_get_pointer(wl_seat::Resource *resource, uint32_t id)
{
if (!pointer.isNull()) {
- pointer->addClient(QWaylandClient::fromWlClient(compositor, resource->client()), id);
+ pointer->addClient(QWaylandClient::fromWlClient(compositor, resource->client()), id, resource->version());
}
}
void QWaylandInputDevicePrivate::seat_get_keyboard(wl_seat::Resource *resource, uint32_t id)
{
if (!keyboard.isNull()) {
- keyboard->addClient(QWaylandClient::fromWlClient(compositor, resource->client()), id);
+ keyboard->addClient(QWaylandClient::fromWlClient(compositor, resource->client()), id, resource->version());
}
}
void QWaylandInputDevicePrivate::seat_get_touch(wl_seat::Resource *resource, uint32_t id)
{
if (!touch.isNull()) {
- touch->addClient(QWaylandClient::fromWlClient(compositor, resource->client()), id);
+ touch->addClient(QWaylandClient::fromWlClient(compositor, resource->client()), id, resource->version());
}
}
diff --git a/src/compositor/compositor_api/qwaylandkeyboard.cpp b/src/compositor/compositor_api/qwaylandkeyboard.cpp
index 76e9a39a..f39bb3e0 100644
--- a/src/compositor/compositor_api/qwaylandkeyboard.cpp
+++ b/src/compositor/compositor_api/qwaylandkeyboard.cpp
@@ -557,10 +557,10 @@ void QWaylandKeyboard::setKeymap(const QWaylandKeymap &keymap)
/*!
* \internal
*/
-void QWaylandKeyboard::addClient(QWaylandClient *client, uint32_t id)
+void QWaylandKeyboard::addClient(QWaylandClient *client, uint32_t id, uint32_t version)
{
Q_D(QWaylandKeyboard);
- d->add(client->client(), id, QtWaylandServer::wl_keyboard::interfaceVersion());
+ d->add(client->client(), id, qMin<uint32_t>(QtWaylandServer::wl_keyboard::interfaceVersion(), version));
}
QT_END_NAMESPACE
diff --git a/src/compositor/compositor_api/qwaylandkeyboard.h b/src/compositor/compositor_api/qwaylandkeyboard.h
index 9ec67a71..3b2282ae 100644
--- a/src/compositor/compositor_api/qwaylandkeyboard.h
+++ b/src/compositor/compositor_api/qwaylandkeyboard.h
@@ -97,7 +97,7 @@ public:
QWaylandSurface *focus() const;
QWaylandClient *focusClient() const;
- virtual void addClient(QWaylandClient *client, uint32_t id);
+ virtual void addClient(QWaylandClient *client, uint32_t id, uint32_t version);
Q_SIGNALS:
void focusChanged(QWaylandSurface *surface);
diff --git a/src/compositor/compositor_api/qwaylandpointer.cpp b/src/compositor/compositor_api/qwaylandpointer.cpp
index f0e2ee8e..51b1f791 100644
--- a/src/compositor/compositor_api/qwaylandpointer.cpp
+++ b/src/compositor/compositor_api/qwaylandpointer.cpp
@@ -273,10 +273,10 @@ bool QWaylandPointer::isButtonPressed() const
/*!
* \internal
*/
-void QWaylandPointer::addClient(QWaylandClient *client, uint32_t id)
+void QWaylandPointer::addClient(QWaylandClient *client, uint32_t id, uint32_t version)
{
Q_D(QWaylandPointer);
- d->add(client->client(), id, QtWaylandServer::wl_pointer::interfaceVersion());
+ d->add(client->client(), id, qMin<uint32_t>(QtWaylandServer::wl_pointer::interfaceVersion(), version));
}
/*!
diff --git a/src/compositor/compositor_api/qwaylandpointer.h b/src/compositor/compositor_api/qwaylandpointer.h
index 3bffde8f..78e2b527 100644
--- a/src/compositor/compositor_api/qwaylandpointer.h
+++ b/src/compositor/compositor_api/qwaylandpointer.h
@@ -73,7 +73,7 @@ public:
bool isButtonPressed() const;
- virtual void addClient(QWaylandClient *client, uint32_t id);
+ virtual void addClient(QWaylandClient *client, uint32_t id, uint32_t version);
struct wl_resource *focusResource() const;
diff --git a/src/compositor/compositor_api/qwaylandtouch.cpp b/src/compositor/compositor_api/qwaylandtouch.cpp
index b2a0c6ef..74373025 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));
}
/*!
diff --git a/src/compositor/compositor_api/qwaylandtouch.h b/src/compositor/compositor_api/qwaylandtouch.h
index 0e1f9a53..aa9ee34c 100644
--- a/src/compositor/compositor_api/qwaylandtouch.h
+++ b/src/compositor/compositor_api/qwaylandtouch.h
@@ -66,7 +66,7 @@ public:
virtual void sendFullTouchEvent(QTouchEvent *event);
- virtual void addClient(QWaylandClient *client, uint32_t id);
+ virtual void addClient(QWaylandClient *client, uint32_t id, uint32_t version);
struct wl_resource *focusResource() const;