1
0
Fork 0

dnd: Clear Wayland drag source when cancelled from stage grab context

This ensures that applications are notified when a drag gets cancelled
because the user dropped or press ESC while in overview.

This fixes an issue with Chromium on Wayland refusing to acknowledge
wl_pointer::enter events after accidentally dropping a
Chromium-originated object in GNOME Shell overview.

Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/2953>
This commit is contained in:
msizanoen1 2023-04-11 12:23:27 +07:00 committed by msizanoen1
parent 2a600ac98e
commit ce0d9ccb37

View file

@ -280,6 +280,8 @@ meta_dnd_wayland_end_notify (MetaDnd *dnd)
MetaDndPrivate *priv = meta_dnd_get_instance_private (dnd); MetaDndPrivate *priv = meta_dnd_get_instance_private (dnd);
MetaWaylandDataDevice *data_device = data_device_from_dnd (dnd); MetaWaylandDataDevice *data_device = data_device_from_dnd (dnd);
meta_wayland_data_device_set_dnd_source (data_device, NULL);
meta_wayland_data_device_unset_dnd_selection (data_device);
meta_wayland_data_device_end_drag (data_device); meta_wayland_data_device_end_drag (data_device);
priv->dnd_during_modal = FALSE; priv->dnd_during_modal = FALSE;