diff options
-rw-r--r-- | dwl.c | 11 |
1 files changed, 10 insertions, 1 deletions
@@ -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 */ |