[mutter/wip/carlosg/selection-bugfixes: 19/19] wayland: Do not check current offer on DnD button release
- From: Robert Mader <rmader src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [mutter/wip/carlosg/selection-bugfixes: 19/19] wayland: Do not check current offer on DnD button release
- Date: Mon, 27 Jan 2020 14:08:23 +0000 (UTC)
commit 30bf588a38c326897efb8637aad5dfeb0cafe5c9
Author: Carlos Garnacho <carlosg gnome org>
Date: Fri Jan 17 19:36:54 2020 +0100
wayland: Do not check current offer on DnD button release
This check was added on commit 48639ac5 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
src/wayland/meta-wayland-data-device.c | 10 +++++++---
1 file changed, 7 insertions(+), 3 deletions(-)
---
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))
{
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]