[Xfce4-commits] [xfce/exo] 01/01: FIX: Thunar crashed when arrow key pressing immediately after directory change (Bug #13238)

noreply at xfce.org noreply at xfce.org
Fri Jun 16 04:48:48 CEST 2017


This is an automated email from the git hooks/post-receive script.

b   l   u   e   s   a   b   r   e       p   u   s   h   e   d       a       c   o   m   m   i   t       t   o       b   r   a   n   c   h       m   a   s   t   e   r   
   in repository xfce/exo.

commit 90f08e1f4aac5201372c8887c020700ec33de015
Author: Dmitry <alexeyev.d at mail.ru>
Date:   Thu Jun 15 22:48:40 2017 -0400

    FIX: Thunar crashed when arrow key pressing immediately after directory change (Bug #13238)
---
 exo/exo-icon-view.c | 19 +++++++++++++++++++
 1 file changed, 19 insertions(+)

diff --git a/exo/exo-icon-view.c b/exo/exo-icon-view.c
index 20ba3fe..4ee7354 100644
--- a/exo/exo-icon-view.c
+++ b/exo/exo-icon-view.c
@@ -5166,6 +5166,25 @@ exo_icon_view_scroll_to_item (ExoIconView     *icon_view,
   gint focus_width;
   gint item_width, item_height;
   GtkAllocation allocation;
+  GtkTreePath *path;
+
+  /* Delay scrolling if either not realized or pending layout() */
+  if (!gtk_widget_get_realized (GTK_WIDGET(icon_view)) || icon_view->priv->layout_idle_id != 0)
+    {
+      /* release the previous scroll_to_path reference */
+      if (G_UNLIKELY (icon_view->priv->scroll_to_path != NULL))
+        gtk_tree_row_reference_free (icon_view->priv->scroll_to_path);
+
+      /* remember a reference for the new path and settings */
+
+      path = gtk_tree_path_new_from_indices (g_list_index (icon_view->priv->items, item), -1);
+      icon_view->priv->scroll_to_path = gtk_tree_row_reference_new_proxy (G_OBJECT (icon_view), icon_view->priv->model, path);
+      gtk_tree_path_free (path);
+
+      icon_view->priv->scroll_to_use_align = FALSE;
+
+      return;
+    }
 
   gtk_widget_style_get (GTK_WIDGET (icon_view),
                         "focus-line-width", &focus_width,

-- 
To stop receiving notification emails like this one, please contact
the administrator of this repository.


More information about the Xfce4-commits mailing list