wayland: Version check before send_primary_selection calls
This is only in v2 BUG: 465657 (cherry picked from commit d084629f3cc56ba1f84af451399360706f97c3ca)icc-effect-5.27.2
parent
ded282df2e
commit
0bc6600ce8
|
@ -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 New Issue