[nautilus] sidebar: Unhighlight the sidebar when leaving DND



commit 757dc36e37cf1a33184104afe454d4d970696685
Author: Corey Berla <corey berla me>
Date:   Tue May 17 10:36:21 2022 -0700

    sidebar: Unhighlight the sidebar when leaving DND
    
    When moving back and forth, or after dropping an item, the last
    row remains highlighted.  Unhighlight all rows in sidebar in
    drag_leave_callback()

 src/gtk/nautilusgtkplacessidebar.c | 3 +++
 1 file changed, 3 insertions(+)
---
diff --git a/src/gtk/nautilusgtkplacessidebar.c b/src/gtk/nautilusgtkplacessidebar.c
index 10b3359b7..e4f39fd6e 100644
--- a/src/gtk/nautilusgtkplacessidebar.c
+++ b/src/gtk/nautilusgtkplacessidebar.c
@@ -1647,6 +1647,7 @@ drag_motion_callback (GtkDropTarget    *target,
   action = 0;
   row = gtk_list_box_get_row_at_y (GTK_LIST_BOX (sidebar->list_box), y);
 
+  /* Workaround https://gitlab.gnome.org/GNOME/gtk/-/issues/5023 */
   gtk_list_box_drag_unhighlight_row (GTK_LIST_BOX (sidebar->list_box));
 
   /* Nothing to do if no value yet */
@@ -1909,6 +1910,8 @@ drag_leave_callback (GtkDropTarget *dest,
 {
   NautilusGtkPlacesSidebar *sidebar = NAUTILUS_GTK_PLACES_SIDEBAR (user_data);
 
+  gtk_list_box_drag_unhighlight_row (GTK_LIST_BOX (sidebar->list_box));
+
   if (sidebar->drop_state != DROP_STATE_NEW_BOOKMARK_ARMED_PERMANENT)
     {
       update_possible_drop_targets (sidebar, FALSE);


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]