From 5b8fe53fa25ea43dd7333bac97b9c2115876034e Mon Sep 17 00:00:00 2001 From: Joe Date: Sun, 2 Mar 2025 01:03:25 +0100 Subject: actually usable --- dwl.c | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/dwl.c b/dwl.c index e810b6a..d284fe0 100644 --- a/dwl.c +++ b/dwl.c @@ -1707,6 +1707,8 @@ focusclient(Client *c, int lift) int unused_lx, unused_ly, old_client_type; Client *old_c = NULL; LayerSurface *old_l = NULL; + unsigned int focused_tag; + unsigned long int i; if (locked) return; @@ -1731,11 +1733,18 @@ focusclient(Client *c, int lift) selmon = c->mon; c->isurgent = 0; client_restack_surface(c); + focused_tag = selmon->tagset[selmon->seltags]; + for (i = 0; i < LENGTH(tags); i++) { + if (focused_tag & (1 << (i - 1))) { + break; + } + } /* Don't change border color if there is an exclusive focus or we are * handling a drag operation */ if (!exclusive_focus && !seat->drag) - client_set_border_color(c, (float[])COLOR(colors[SchemeSel][ColBorder])); + client_set_border_color(c, (float[])COLOR(tagsel[i - 1][0])); + // client_set_border_color(c, (float[])COLOR(colors[SchemeSel][ColBorder])); } /* Deactivate old client if focus is changing */ -- cgit v1.2.3