From 471e7205aa9938491cdde7ce1176cc788c1fcf2b Mon Sep 17 00:00:00 2001 From: Christian Hergert Date: Tue, 25 Jul 2023 14:08:57 -0700 Subject: [PATCH] sysprof: clear focus when setting model We seem to run into some weird ownership issues when there is focus during the transition. Just work around it a bit for now. --- src/sysprof/sysprof-callgraph-view.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/sysprof/sysprof-callgraph-view.c b/src/sysprof/sysprof-callgraph-view.c index 1fa37221..a88bfd35 100644 --- a/src/sysprof/sysprof-callgraph-view.c +++ b/src/sysprof/sysprof-callgraph-view.c @@ -93,6 +93,8 @@ sysprof_callgraph_view_set_descendants (SysprofCallgraphView *self, g_assert (SYSPROF_IS_CALLGRAPH_VIEW (self)); g_assert (G_IS_LIST_MODEL (model)); + gtk_root_set_focus (gtk_widget_get_root (GTK_WIDGET (self)), NULL); + column_sorter = gtk_column_view_get_sorter (self->descendants_column_view); descendants_tree = gtk_tree_list_model_new (g_object_ref (model), FALSE, FALSE,