diff options
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 |