diff --git a/src/wayland/meta-wayland-data-device.c b/src/wayland/meta-wayland-data-device.c index 915744bae..cd11d618e 100644 --- a/src/wayland/meta-wayland-data-device.c +++ b/src/wayland/meta-wayland-data-device.c @@ -580,9 +580,14 @@ destroy_data_offer (struct wl_resource *resource) if (seat->data_device.dnd_data_source == offer->source && wl_resource_get_version (offer->resource) < WL_DATA_OFFER_ACTION_SINCE_VERSION) - meta_wayland_data_source_notify_finish (offer->source); + { + meta_wayland_data_source_notify_finish (offer->source); + } else - meta_wayland_data_source_set_current_offer (offer->source, NULL); + { + meta_wayland_data_source_set_current_offer (offer->source, NULL); + meta_wayland_data_source_set_has_target (offer->source, FALSE); + } } g_object_remove_weak_pointer (G_OBJECT (offer->source), @@ -1040,7 +1045,6 @@ drag_grab_button (MetaWaylandPointerGrab *grab, gboolean success; if (drag_grab->drag_focus && source && - meta_wayland_data_source_get_current_offer (source) && meta_wayland_data_source_has_target (source) && meta_wayland_data_source_get_current_action (source)) {