From 160cc9859748f45ca94d9ce83e602f97215a7fb3 Mon Sep 17 00:00:00 2001 From: Vlad Zahorodnii Date: Mon, 13 Feb 2023 13:16:50 +0200 Subject: [PATCH] wayland: Fix a typo in DataControlDeviceV1Interface::sendPrimarySelection() interfaceVersion() is not the same as the resource version. --- src/wayland/datacontroldevice_v1_interface.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/wayland/datacontroldevice_v1_interface.cpp b/src/wayland/datacontroldevice_v1_interface.cpp index 0b5c980a98..a144e75158 100644 --- a/src/wayland/datacontroldevice_v1_interface.cpp +++ b/src/wayland/datacontroldevice_v1_interface.cpp @@ -143,7 +143,7 @@ void DataControlDeviceV1Interface::sendSelection(AbstractDataSource *other) void DataControlDeviceV1Interface::sendPrimarySelection(KWaylandServer::AbstractDataSource *other) { - if (d->interfaceVersion() >= ZWLR_DATA_CONTROL_DEVICE_V1_PRIMARY_SELECTION_SINCE_VERSION) { + if (d->resource()->version() >= ZWLR_DATA_CONTROL_DEVICE_V1_PRIMARY_SELECTION_SINCE_VERSION) { DataControlOfferV1Interface *offer = d->createDataOffer(other); d->send_primary_selection(offer ? offer->resource() : nullptr); }