mirror of
https://github.com/brl/mutter.git
synced 2024-11-23 08:30:42 -05:00
wayland: Do not check current offer on DnD button release
This check was added on commit48639ac5
as a means to disregard DnD drops where the offer would disappear beforehand. However since that commit was all about wl_data_device_manager version < 3, forgetting about the selected mimetype seems a behavior more inline with those versions. Since no current drop is something expected on X11 drop sites, fixes DnD over those, while keeping the original bug fixed. Found by Robert Mader (https://gitlab.gnome.org/GNOME/mutter/issues/974#note_688144) https://gitlab.gnome.org/GNOME/mutter/issues/974 https://gitlab.gnome.org/GNOME/mutter/merge_requests/1005 (cherry picked from commit30bf588a38
)
This commit is contained in:
parent
21dca32934
commit
5ae317e004
@ -569,9 +569,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),
|
||||
@ -1031,7 +1036,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))
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user