summaryrefslogtreecommitdiffstats
path: root/client.h
diff options
context:
space:
mode:
authorSquibid <me@zacharyscheiman.com>2025-02-11 15:45:12 -0600
committerSquibid <me@zacharyscheiman.com>2025-02-11 15:45:12 -0600
commitd06ea7dcb8d51bf7cff3800dcfcd7ae852e3cb7f (patch)
tree7ef896302680b50aa38208e4de2a8dcd953d4aa8 /client.h
parentefc1c9f49fc4d4d632ada3c57864a9d6e6f8ad6c (diff)
downloaddwl-d06ea7dcb8d51bf7cff3800dcfcd7ae852e3cb7f.tar.gz
dwl-d06ea7dcb8d51bf7cff3800dcfcd7ae852e3cb7f.tar.bz2
dwl-d06ea7dcb8d51bf7cff3800dcfcd7ae852e3cb7f.zip
add colored borders
Diffstat (limited to 'client.h')
-rw-r--r--client.h20
1 files changed, 18 insertions, 2 deletions
diff --git a/client.h b/client.h
index f1e2ab5..74ddd2a 100644
--- a/client.h
+++ b/client.h
@@ -314,8 +314,24 @@ static inline void
client_set_border_color(Client *c, const float color[static 4])
{
int i;
- for (i = 0; i < 4; i++)
- wlr_scene_rect_set_color(c->border[i], color);
+
+ if (!c)
+ return;
+
+ if (c == focustop(selmon)) {
+ if (selmon->lt[selmon->sellt] == (Layout*)&layouts[1] || c->isfloating)
+ color = floatcolor;
+ else if (selmon->lt[selmon->sellt] == (Layout*)&layouts[2])
+ color = monoclecolor;
+ else if (c->isurgent && client_is_mapped(c))
+ color = urgentcolor;
+ else if (!exclusive_focus && !seat->drag)
+ color = focuscolor;
+ } else
+ color = color;
+
+ for (i = 0; i < 4; i++)
+ wlr_scene_rect_set_color(c->border[i], color);
}
static inline void