summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorVito Caputo <vcaputo@gnugeneration.com>2017-03-25 04:23:32 -0700
committerVito Caputo <vcaputo@gnugeneration.com>2017-03-25 04:23:32 -0700
commit1d7368838282740cb81f9fafe77b260991e7c1be (patch)
treed77dabaab9ec7d8715a4fc2324e048ccf40ef360 /src
parentfd3dc25ae8512d3acdd29d3ea5c8643724c29e7b (diff)
*: more minor style fixups
Diffstat (limited to 'src')
-rw-r--r--src/composite.c5
-rw-r--r--src/overlays.c12
-rw-r--r--src/window.c3
3 files changed, 8 insertions, 12 deletions
diff --git a/src/composite.c b/src/composite.c
index 76a6d81..ad04480 100644
--- a/src/composite.c
+++ b/src/composite.c
@@ -198,7 +198,8 @@ void vwm_composite_paint_all(vwm_t *vwm)
repaint_needed = 0;
- if (!undamage_region) undamage_region = XFixesCreateRegion(VWM_XDISPLAY(vwm), NULL, 0);
+ if (!undamage_region)
+ undamage_region = XFixesCreateRegion(VWM_XDISPLAY(vwm), NULL, 0);
/* (re)create the root picture from the root window and allocate a double buffer for the off-screen composition of the damaged contents */
if (root_picture == None) {
@@ -268,7 +269,7 @@ void vwm_composite_paint_all(vwm_t *vwm)
/* since translucent windows aren't supported in vwm, I can do this more efficiently */
list_for_each_entry_prev(xwin, &vwm->xwindows, xwindows) {
- XRectangle r;
+ XRectangle r;
if (!vwm_xwin_is_mapped(vwm, xwin) || xwin->occluded)
continue; /* if !mapped or occluded skip */
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 */
diff --git a/src/window.c b/src/window.c
index ba8d0b4..92da503 100644
--- a/src/window.c
+++ b/src/window.c
@@ -219,10 +219,9 @@ void vwm_win_focus(vwm_t *vwm, vwm_window_t *vwin)
/* fullscreen windows in the shelf when focused, since we don't intend to overlap there */
vwm_win_autoconf(vwm, vwin, VWM_SCREEN_REL_POINTER, VWM_WIN_AUTOCONF_FULL); /* XXX TODO: for now the shelf follows the pointer, it's simple. */
} else {
- if (vwin->desktop->focused_window) {
+ if (vwin->desktop->focused_window)
/* set the border of the previously focused window on the same desktop to the unfocused color */
XSetWindowBorder(VWM_XDISPLAY(vwm), vwin->desktop->focused_window->xwindow->id, vwm->colors.unfocused_window_border_color.pixel);
- }
/* set the border of the newly focused window to the focused color */
XSetWindowBorder(VWM_XDISPLAY(vwm), vwin->xwindow->id, vwm->colors.focused_window_border_color.pixel);
© All Rights Reserved