diff options
author | Vito Caputo <vcaputo@gnugeneration.com> | 2017-03-25 04:23:32 -0700 |
---|---|---|
committer | Vito Caputo <vcaputo@gnugeneration.com> | 2017-03-25 04:23:32 -0700 |
commit | 1d7368838282740cb81f9fafe77b260991e7c1be (patch) | |
tree | d77dabaab9ec7d8715a4fc2324e048ccf40ef360 /src/overlays.c | |
parent | fd3dc25ae8512d3acdd29d3ea5c8643724c29e7b (diff) |
*: more minor style fixups
Diffstat (limited to 'src/overlays.c')
-rw-r--r-- | src/overlays.c | 12 |
1 files changed, 4 insertions, 8 deletions
diff --git a/src/overlays.c b/src/overlays.c index 5ad75b1..4033667 100644 --- a/src/overlays.c +++ b/src/overlays.c @@ -370,14 +370,12 @@ static int count_rows(vmon_proc_t *proc) vmon_proc_t *child; if (!proc->is_thread) { - list_for_each_entry(child, &proc->threads, threads) { + list_for_each_entry(child, &proc->threads, threads) count += count_rows(child); - } } - list_for_each_entry(child, &proc->children, siblings) { + list_for_each_entry(child, &proc->children, siblings) count += count_rows(child); - } return count; } @@ -458,12 +456,11 @@ static void draw_heirarchy_row(vwm_overlays_t *overlays, vwm_overlay_t *overlay, return; /* TODO: make the columns interactively configurable @ runtime */ - if (!proc->is_new) { + if (!proc->is_new) /* XXX for now always clear the row, this should be capable of being optimized in the future (if the datums driving the text haven't changed...) */ XRenderFillRectangle(xserver->display, PictOpSrc, overlay->text_picture, &overlay_trans_color, 0, row * OVERLAY_ROW_HEIGHT, /* dst x, y */ overlay->width, OVERLAY_ROW_HEIGHT); /* dst w, h */ - } /* put the process' wchan, state, and PID columns @ the far right */ if (proc->is_thread || list_empty(&proc->threads)) { /* only threads or non-threaded processes include the wchan and state */ @@ -485,11 +482,10 @@ static void draw_heirarchy_row(vwm_overlays_t *overlays, vwm_overlay_t *overlay, items, nr_items); /* ensure the area for the rest of the stuff is cleared, we don't put much text into thread rows so skip it for those. */ - if (!proc->is_thread) { + if (!proc->is_thread) XRenderFillRectangle(xserver->display, PictOpSrc, overlay->text_picture, &overlay_trans_color, overlay->visible_width - str_width, row * OVERLAY_ROW_HEIGHT, /* dst x,y */ overlay->width - (overlay->visible_width - str_width), OVERLAY_ROW_HEIGHT); /* dst w,h */ - } XDrawString(xserver->display, overlay->text_pixmap, overlays->text_gc, overlay->visible_width - str_width, (row + 1) * OVERLAY_ROW_HEIGHT - 3, /* dst x, y */ |