summaryrefslogtreecommitdiffstats
path: root/client.h
diff options
context:
space:
mode:
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