Increase version requirements for wl_data_device_release
* wl_data_device_manager -> version 2 * wl_data_device -> version 2 * Wayland -> version 1.7 Unfortunately the client side is not yet completely correct. We need to call wl_data_device_release only if we have a data device of version 2. But there is no easy way to test this. To change we will need to introduce a client side version tracking. BUG: 352663
This commit is contained in:
parent
38d155ff5e
commit
265504a088
1 changed files with 7 additions and 3 deletions
|
@ -49,9 +49,13 @@ private:
|
||||||
DataDeviceManagerInterface *q;
|
DataDeviceManagerInterface *q;
|
||||||
static const struct wl_data_device_manager_interface s_interface;
|
static const struct wl_data_device_manager_interface s_interface;
|
||||||
static const quint32 s_version;
|
static const quint32 s_version;
|
||||||
|
static const qint32 s_dataDeviceVersion;
|
||||||
|
static const qint32 s_dataSourceVersion;
|
||||||
};
|
};
|
||||||
|
|
||||||
const quint32 DataDeviceManagerInterface::Private::s_version = 1;
|
const quint32 DataDeviceManagerInterface::Private::s_version = 2;
|
||||||
|
const qint32 DataDeviceManagerInterface::Private::s_dataDeviceVersion = 2;
|
||||||
|
const qint32 DataDeviceManagerInterface::Private::s_dataSourceVersion = 1;
|
||||||
|
|
||||||
#ifndef DOXYGEN_SHOULD_SKIP_THIS
|
#ifndef DOXYGEN_SHOULD_SKIP_THIS
|
||||||
const struct wl_data_device_manager_interface DataDeviceManagerInterface::Private::s_interface = {
|
const struct wl_data_device_manager_interface DataDeviceManagerInterface::Private::s_interface = {
|
||||||
|
@ -91,7 +95,7 @@ void DataDeviceManagerInterface::Private::createDataSourceCallback(wl_client *cl
|
||||||
void DataDeviceManagerInterface::Private::createDataSource(wl_client *client, wl_resource *resource, uint32_t id)
|
void DataDeviceManagerInterface::Private::createDataSource(wl_client *client, wl_resource *resource, uint32_t id)
|
||||||
{
|
{
|
||||||
DataSourceInterface *dataSource = new DataSourceInterface(q, resource);
|
DataSourceInterface *dataSource = new DataSourceInterface(q, resource);
|
||||||
dataSource->create(display->getConnection(client), wl_resource_get_version(resource), id);
|
dataSource->create(display->getConnection(client), qMin(wl_resource_get_version(resource), s_dataSourceVersion) , id);
|
||||||
if (!dataSource->resource()) {
|
if (!dataSource->resource()) {
|
||||||
wl_resource_post_no_memory(resource);
|
wl_resource_post_no_memory(resource);
|
||||||
delete dataSource;
|
delete dataSource;
|
||||||
|
@ -110,7 +114,7 @@ void DataDeviceManagerInterface::Private::getDataDevice(wl_client *client, wl_re
|
||||||
SeatInterface *s = SeatInterface::get(seat);
|
SeatInterface *s = SeatInterface::get(seat);
|
||||||
Q_ASSERT(s);
|
Q_ASSERT(s);
|
||||||
DataDeviceInterface *dataDevice = new DataDeviceInterface(s, q, resource);
|
DataDeviceInterface *dataDevice = new DataDeviceInterface(s, q, resource);
|
||||||
dataDevice->create(display->getConnection(client), wl_resource_get_version(resource), id);
|
dataDevice->create(display->getConnection(client), qMin(wl_resource_get_version(resource), s_dataDeviceVersion), id);
|
||||||
if (!dataDevice->resource()) {
|
if (!dataDevice->resource()) {
|
||||||
wl_resource_post_no_memory(resource);
|
wl_resource_post_no_memory(resource);
|
||||||
return;
|
return;
|
||||||
|
|
Loading…
Reference in a new issue