diff options
author | Devin J. Pohly <djpohly@gmail.com> | 2020-07-26 19:26:20 -0400 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-07-26 19:26:20 -0400 |
commit | 5248efd407de4f8a1b6744092c21436891971b4e (patch) | |
tree | 22b93d8aad64c20b0d401520d832b38dca310ca6 /dwl.c | |
parent | 59c814d3dad5f20216c56338814986d39a124b95 (diff) | |
parent | 2fb3701c6e3f897793cf521ddf1fe4fe9ef54612 (diff) |
Merge pull request #21 from mchackorg/focus-color
Add support to change focused window's border color
Diffstat (limited to 'dwl.c')
-rw-r--r-- | dwl.c | 11 |
1 files changed, 9 insertions, 2 deletions
@@ -1138,7 +1138,8 @@ render(struct wlr_surface *surface, int sx, int sy, void *data) void renderclients(Monitor *m, struct timespec *now) { - Client *c; + Client *c, *sel = selclient(); + const float *color; double ox, oy; int i, w, h; struct render_data rdata; @@ -1164,9 +1165,15 @@ renderclients(Monitor *m, struct timespec *now) {ox + c->bw + w, oy + c->bw, c->bw, h}, /* right */ {ox, oy + c->bw + h, w + 2 * c->bw, c->bw}, /* bottom */ }; + + if (c == sel) + color = focuscolor; + else + color = bordercolor; + for (i = 0; i < 4; i++) { scalebox(&borders[i], m->wlr_output->scale); - wlr_render_rect(drw, &borders[i], bordercolor, + wlr_render_rect(drw, &borders[i], color, m->wlr_output->transform_matrix); } |