wayland: Send data offer source actions only for dnd

It makes sense only with dnd and sending the source_actions events for
selections and primary selections tricks gtk into thinking that there
are drag motion events.

BUG: 464196
This commit is contained in:
Vlad Zahorodnii 2024-04-10 17:29:56 +03:00
parent 9ca69cf50c
commit ab1350b6a6

View file

@ -164,7 +164,6 @@ DataOfferInterface *DataDeviceInterfacePrivate::createDataOffer(AbstractDataSour
DataOfferInterface *offer = new DataOfferInterface(source, data_offer_resource);
send_data_offer(offer->resource());
offer->sendAllOffers();
offer->sendSourceActions();
return offer;
}
@ -276,6 +275,8 @@ void DataDeviceInterface::updateDragTarget(SurfaceInterface *surface, quint32 se
dragSource->accept(QString());
}
DataOfferInterface *offer = d->createDataOffer(dragSource);
offer->sendSourceActions();
d->drag.surface = surface;
if (d->seat->isDragPointer()) {
d->drag.posConnection = connect(d->seat, &SeatInterface::pointerPosChanged, this, [this] {