wayland: Fix drag offer leak
The data device leave function is intended for drag offers, not selections, and the function as was previously written was a no-op.
This commit is contained in:
@@ -1877,11 +1877,10 @@ static void data_device_handle_enter(void *data, struct wl_data_device *wl_data_
|
|||||||
static void data_device_handle_leave(void *data, struct wl_data_device *wl_data_device)
|
static void data_device_handle_leave(void *data, struct wl_data_device *wl_data_device)
|
||||||
{
|
{
|
||||||
SDL_WaylandDataDevice *data_device = data;
|
SDL_WaylandDataDevice *data_device = data;
|
||||||
SDL_WaylandDataOffer *offer = NULL;
|
|
||||||
|
|
||||||
if (data_device->selection_offer != NULL) {
|
if (data_device->drag_offer != NULL) {
|
||||||
data_device->selection_offer = NULL;
|
Wayland_data_offer_destroy(data_device->drag_offer);
|
||||||
Wayland_data_offer_destroy(offer);
|
data_device->drag_offer = NULL;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user