From 9054799f2fbdf17dfc5ffad0be1d3f96548c5a13 Mon Sep 17 00:00:00 2001 From: infirit Date: Fri, 19 Dec 2014 01:01:04 +0100 Subject: Collapse kthreadd by default on linuxes in process tree mode Taken from GSM commit: e0d1da0eccda35a22038726fc574b8ab92f05ff0 From: Robert Roth Gnome bug: https://bugzilla.gnome.org/show_bug.cgi?id=667830 --- src/proctable.cpp | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/src/proctable.cpp b/src/proctable.cpp index b1ada60..cec4892 100644 --- a/src/proctable.cpp +++ b/src/proctable.cpp @@ -689,8 +689,12 @@ insert_info_to_tree (ProcInfo *info, ProcData *procdata, bool forced = false) GtkTreePath *parent_node = gtk_tree_model_get_path(model, &parent->node); gtk_tree_store_insert(GTK_TREE_STORE(model), &info->node, &parent->node, 0); - if (!gtk_tree_view_row_expanded(GTK_TREE_VIEW(procdata->tree), parent_node)) - gtk_tree_view_expand_row(GTK_TREE_VIEW(procdata->tree), parent_node, FALSE); + if (!gtk_tree_view_row_expanded(GTK_TREE_VIEW(procdata->tree), parent_node) +#ifdef __linux__ + // on linuxes we don't want to expand kthreadd by default (always has pid 2) + && (parent->pid != 2) +#endif + ) gtk_tree_view_expand_row(GTK_TREE_VIEW(procdata->tree), parent_node, FALSE); gtk_tree_path_free(parent_node); } else -- cgit v1.2.1