wayland: Version check before send_primary_selection calls
This is only in v2 BUG: 465657
This commit is contained in:
parent
a9dd78e246
commit
d084629f3c
1 changed files with 4 additions and 2 deletions
|
@ -143,7 +143,9 @@ void DataControlDeviceV1Interface::sendSelection(AbstractDataSource *other)
|
|||
|
||||
void DataControlDeviceV1Interface::sendPrimarySelection(KWaylandServer::AbstractDataSource *other)
|
||||
{
|
||||
DataControlOfferV1Interface *offer = d->createDataOffer(other);
|
||||
d->send_primary_selection(offer ? offer->resource() : nullptr);
|
||||
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);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue