diff --git a/ChangeLog b/ChangeLog index aa12aa22..5f9e0c89 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,8 @@ # $Id$ +2007-07-15 + * Fix PID display, patch #1753934. thanks to sohalt. + 2007-06-21 * Right-justify top/top_mem vars (pid/cpu/mem} so they align on the decimal. diff --git a/src/conky.c b/src/conky.c index c77d0aec..a09d1448 100644 --- a/src/conky.c +++ b/src/conky.c @@ -4949,7 +4949,7 @@ static void generate_text_internal(char *p, int p_max_size, struct text_object * } else if (obj->data.top.type == TOP_PID && obj->data.top.num >= 0 && obj->data.top.num < 10) { - snprintf(p, 8, "%8i", + snprintf(p, 8, "%7i", cur->cpu[obj->data.top. num]->pid); } else if (obj->data.top.type == TOP_MEM @@ -4976,7 +4976,7 @@ static void generate_text_internal(char *p, int p_max_size, struct text_object * } else if (obj->data.top.type == TOP_PID && obj->data.top.num >= 0 && obj->data.top.num < 10) { - snprintf(p, 8, "%8i", + snprintf(p, 8, "%7i", cur->memu[obj->data.top. num]->pid); } else if (obj->data.top.type == TOP_MEM