diff options
author | Corey Berla <corey@berla.me> | 2022-11-05 07:45:41 -0700 |
---|---|---|
committer | António Fernandes <antoniof@gnome.org> | 2022-12-15 11:57:21 +0000 |
commit | 337a1b80e7e70697d71e15532f369d1e7b3ee52c (patch) | |
tree | 0ae48b294edf6ff0b2f79e51577fd8d79f8bb0c2 | |
parent | 80f065f2532350c04f56d3cfed95b90cdf0194d6 (diff) | |
download | nautilus-337a1b80e7e70697d71e15532f369d1e7b3ee52c.tar.gz |
list-base: Clear hover timeout on drop
In a wayland session, leave is emitted on a drop or cancelled drop.
In x11 that's not the case. Explicitly clear the hover timeout
on drop.
Fixes: https://gitlab.gnome.org/GNOME/nautilus/-/issues/2585
-rw-r--r-- | src/nautilus-list-base.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/nautilus-list-base.c b/src/nautilus-list-base.c index 15e37d84e..93c20ccd3 100644 --- a/src/nautilus-list-base.c +++ b/src/nautilus-list-base.c @@ -851,6 +851,7 @@ on_item_drop (GtkDropTarget *target, { NautilusViewCell *cell = user_data; g_autoptr (NautilusListBase) self = nautilus_view_cell_get_view (cell); + NautilusListBasePrivate *priv = nautilus_list_base_get_instance_private (self); g_autoptr (NautilusViewItem) item = nautilus_view_cell_get_item (cell); GdkDragAction actions; GFile *target_location; @@ -869,6 +870,9 @@ on_item_drop (GtkDropTarget *target, } #endif + /* In x11 the leave signal isn't emitted on a drop so we need to clear the timeout */ + g_clear_handle_id (&priv->hover_timer_id, g_source_remove); + real_perform_drop (self, value, actions, target_location); return TRUE; |