summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorinfirit <[email protected]>2014-12-19 01:01:04 +0100
committerinfirit <[email protected]>2014-12-19 01:01:04 +0100
commit9054799f2fbdf17dfc5ffad0be1d3f96548c5a13 (patch)
treeffab50a7669d49184b7371b57f3f37388db87512 /src
parenta1be8b72cb9cf9cb259831fca6769ab16cef5b44 (diff)
downloadmate-system-monitor-9054799f2fbdf17dfc5ffad0be1d3f96548c5a13.tar.bz2
mate-system-monitor-9054799f2fbdf17dfc5ffad0be1d3f96548c5a13.tar.xz
Collapse kthreadd by default on linuxes in process tree mode
Taken from GSM commit: e0d1da0eccda35a22038726fc574b8ab92f05ff0 From: Robert Roth <[email protected]> Gnome bug: https://bugzilla.gnome.org/show_bug.cgi?id=667830
Diffstat (limited to 'src')
-rw-r--r--src/proctable.cpp8
1 files 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