wayland: Version check before send_primary_selection calls

This is only in v2

BUG: 465657
This commit is contained in:
David Edmundson 2023-02-13 09:33:11 +00:00
parent a9dd78e246
commit d084629f3c

View file

@ -143,7 +143,9 @@ void DataControlDeviceV1Interface::sendSelection(AbstractDataSource *other)
void DataControlDeviceV1Interface::sendPrimarySelection(KWaylandServer::AbstractDataSource *other)
{
if (d->interfaceVersion() >= ZWLR_DATA_CONTROL_DEVICE_V1_PRIMARY_SELECTION_SINCE_VERSION) {
DataControlOfferV1Interface *offer = d->createDataOffer(other);
d->send_primary_selection(offer ? offer->resource() : nullptr);
}
}
}