From ce0d9ccb37c8bb9831c290cd636539a218a7fa18 Mon Sep 17 00:00:00 2001 From: msizanoen1 Date: Tue, 11 Apr 2023 12:23:27 +0700 Subject: [PATCH] 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: --- src/compositor/meta-dnd.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/compositor/meta-dnd.c b/src/compositor/meta-dnd.c index afe23807b..33bd6ad90 100644 --- a/src/compositor/meta-dnd.c +++ b/src/compositor/meta-dnd.c @@ -280,6 +280,8 @@ meta_dnd_wayland_end_notify (MetaDnd *dnd) MetaDndPrivate *priv = meta_dnd_get_instance_private (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); priv->dnd_during_modal = FALSE;