diff options
author | Squibid <me@zacharyscheiman.com> | 2025-02-11 15:45:12 -0600 |
---|---|---|
committer | Squibid <me@zacharyscheiman.com> | 2025-02-11 15:45:12 -0600 |
commit | d06ea7dcb8d51bf7cff3800dcfcd7ae852e3cb7f (patch) | |
tree | 7ef896302680b50aa38208e4de2a8dcd953d4aa8 /client.h | |
parent | efc1c9f49fc4d4d632ada3c57864a9d6e6f8ad6c (diff) | |
download | dwl-d06ea7dcb8d51bf7cff3800dcfcd7ae852e3cb7f.tar.gz dwl-d06ea7dcb8d51bf7cff3800dcfcd7ae852e3cb7f.tar.bz2 dwl-d06ea7dcb8d51bf7cff3800dcfcd7ae852e3cb7f.zip |
add colored borders
Diffstat (limited to 'client.h')
-rw-r--r-- | client.h | 20 |
1 files changed, 18 insertions, 2 deletions
@@ -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 |