mirror of
https://gitlab.freedesktop.org/wayland/wayland.git
synced 2025-11-21 06:59:46 -05:00
Add reject round trip to dnd protocol
This lets a drag target reject a drop.
This commit is contained in:
parent
41da90897c
commit
d44bc8b8ee
3 changed files with 25 additions and 6 deletions
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue