window: Handle data_device.selection events with offer=NULL
This happens when the current selection data_offer is removed.
This commit is contained in:
+5
-3
@@ -1866,9 +1866,11 @@ data_device_selection(void *data,
|
|||||||
if (input->selection_offer)
|
if (input->selection_offer)
|
||||||
data_offer_destroy(input->selection_offer);
|
data_offer_destroy(input->selection_offer);
|
||||||
|
|
||||||
input->selection_offer = wl_data_offer_get_user_data(offer);
|
if (offer) {
|
||||||
p = wl_array_add(&input->selection_offer->types, sizeof *p);
|
input->selection_offer = wl_data_offer_get_user_data(offer);
|
||||||
*p = NULL;
|
p = wl_array_add(&input->selection_offer->types, sizeof *p);
|
||||||
|
*p = NULL;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
static const struct wl_data_device_listener data_device_listener = {
|
static const struct wl_data_device_listener data_device_listener = {
|
||||||
|
|||||||
Reference in New Issue
Block a user