Add reject round trip to dnd protocol

This lets a drag target reject a drop.
This commit is contained in:
Kristian Høgsberg 2010-11-30 15:10:26 -05:00
parent 41da90897c
commit d44bc8b8ee
3 changed files with 25 additions and 6 deletions

View file

@ -1137,9 +1137,19 @@ drag_offer_receive(struct wl_client *client,
close(fd);
}
static void
drag_offer_reject(struct wl_client *client, struct wl_drag_offer *offer)
{
struct wl_drag *drag = container_of(offer, struct wl_drag, drag_offer);
wl_client_post_event(drag->source->client, &drag->resource.base,
WL_DRAG_REJECT);
}
static const struct wl_drag_offer_interface drag_offer_interface = {
drag_offer_accept,
drag_offer_receive
drag_offer_receive,
drag_offer_reject
};
static void