Commit 00621892 authored by Vlad Zahorodnii's avatar Vlad Zahorodnii
Browse files

wayland: Send wl_data_offer.source_actions before wl_data_device.enter

This makes kwin's behavior consistent with other wayland compositors
(sway, GNOME Shell, etc) and it's reasonable to provide all the
information about the data source before wl_data_device.enter. It also
makes Firefox happier.

Relevant discussion upstream:

CCBUG: 445661

(cherry picked from commit 3546cc05)
parent 82cf6f3c
Pipeline #235923 passed with stage
in 12 minutes and 58 seconds
......@@ -156,6 +156,7 @@ DataOfferInterface *DataDeviceInterfacePrivate::createDataOffer(AbstractDataSour
DataOfferInterface *offer = new DataOfferInterface(source, data_offer_resource);
return offer;
......@@ -308,7 +309,6 @@ void DataDeviceInterface::updateDragTarget(SurfaceInterface *surface, quint32 se
d->send_enter(serial, surface->resource(), wl_fixed_from_double(pos.x()), wl_fixed_from_double(pos.y()), offer ? offer->resource() : nullptr);
if (offer) {
auto matchOffers = [dragSource, offer] {
const DataDeviceManagerInterface::DnDAction action = chooseDndAction(dragSource, offer);
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment