mirror of
https://github.com/hyprwm/wlroots-hyprland.git
synced 2024-11-02 11:55:59 +01:00
data-device: make old offers inert before sending selection
Fixes https://github.com/swaywm/wlroots/issues/1383
This commit is contained in:
parent
fd0b625ab9
commit
07e1bedb08
1 changed files with 7 additions and 0 deletions
|
@ -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);
|
||||||
|
|
Loading…
Reference in a new issue