Merge pull request #1557 from emersion/inert-offers

data-device: make old offers inert before sending selection
This commit is contained in:
Drew DeVault 2019-02-18 15:27:09 -05:00 committed by GitHub
commit b455df3b91
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 7 additions and 0 deletions

View File

@ -126,6 +126,13 @@ void seat_client_send_selection(struct wlr_seat_client *seat_client) {
source->accepted = false; source->accepted = false;
} }
// Make all current offers inert
struct wlr_data_offer *offer, *tmp;
wl_list_for_each_safe(offer, tmp,
&seat_client->seat->selection_offers, link) {
data_offer_destroy(offer);
}
struct wl_resource *device_resource; struct wl_resource *device_resource;
wl_resource_for_each(device_resource, &seat_client->data_devices) { wl_resource_for_each(device_resource, &seat_client->data_devices) {
device_resource_send_selection(device_resource); device_resource_send_selection(device_resource);