diff options
author | Steven Rostedt <srostedt@redhat.com> | 2009-12-31 00:17:47 -0500 |
---|---|---|
committer | Steven Rostedt <rostedt@goodmis.org> | 2009-12-31 00:17:47 -0500 |
commit | f84bc1f92e9e6430fd50569ddde22b136f723bd8 (patch) | |
tree | 4e05099f159d3c2185ff9e6f22de7d9c90ad0132 | |
parent | 7411726d3d1fc6e880ea69f046eca25d8c111674 (diff) |
trace-graph: Fix color of task starting window
The color was not being set up for the box if a task other than
idle was the first event on a CPU. The gc variable used to draw
the task box was not initialized and the color of the task was
random at the start.
Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
-rw-r--r-- | trace-graph.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/trace-graph.c b/trace-graph.c index 8505169..7044fac 100644 --- a/trace-graph.c +++ b/trace-graph.c | |||
@@ -888,8 +888,10 @@ static void draw_cpu(struct graph_info *ginfo, gint cpu, | |||
888 | 888 | ||
889 | if (last_pid != pid) { | 889 | if (last_pid != pid) { |
890 | 890 | ||
891 | if (last_pid < 0) | 891 | if (last_pid < 0) { |
892 | last_pid = pid; | 892 | last_pid = pid; |
893 | set_color_by_pid(ginfo->draw, gc, pid); | ||
894 | } | ||
893 | 895 | ||
894 | if (last_pid) | 896 | if (last_pid) |
895 | gdk_draw_rectangle(ginfo->curr_pixmap, gc, | 897 | gdk_draw_rectangle(ginfo->curr_pixmap, gc, |