data-control: add primary selection support

data-control: separate out a data_offer struct

This is a prerequisite to adding primary selection support.

data-control: separate out data_control_source

This is a prerequisite to adding primary selection support, since that
doesn't use wlr_data_source, but rather wlr_primary_selection_source.

Update the data-control protocol

data-control: add primary selection support

Merge create_offer and create_primary_offer

Extract code into data_control_source_destroy()

Fix pointer style

Move resource neutralization to destructor

Store wl_resource in the data_offer

Extract data_offer destruction into a function
This commit is contained in:
Ivan Molodetskikh 2019-02-01 12:49:46 +03:00 committed by emersion
parent 95ff898512
commit 9e49ceb129
3 changed files with 435 additions and 74 deletions

View file

@ -32,9 +32,11 @@ struct wlr_data_control_device_v1 {
struct wlr_seat *seat;
struct wl_resource *selection_offer_resource; // current selection offer
struct wl_resource *primary_selection_offer_resource; // current primary selection offer
struct wl_listener seat_destroy;
struct wl_listener seat_set_selection;
struct wl_listener seat_set_primary_selection;
};
struct wlr_data_control_manager_v1 *wlr_data_control_manager_v1_create(