diff --git a/dwl.c b/dwl.c index 42411bf..d849bfa 100644 --- a/dwl.c +++ b/dwl.c @@ -1496,8 +1496,13 @@ focusclient(Client *c, int lift) /* 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, focuscolor); + if (!exclusive_focus && !seat->drag) { + if (c->issticky) { + client_set_border_color(c, mixedcolor); + } + else + client_set_border_color(c, focuscolor); + } } /* Deactivate old client if focus is changing */ @@ -1514,7 +1519,10 @@ focusclient(Client *c, int lift) /* Don't deactivate old client if the new one wants focus, as this causes issues with winecfg * and probably other clients */ } else if (old_c && !client_is_unmanaged(old_c) && (!c || !client_wants_focus(c))) { - client_set_border_color(old_c, bordercolor); + if (old_c->issticky) + client_set_border_color(old_c, stickycolor); + else + client_set_border_color(old_c, bordercolor); client_activate_surface(old, 0); } @@ -2884,6 +2892,15 @@ togglesticky(const Arg *arg) if (!sel) return; sel->issticky = !sel->issticky; + + if (sel->issticky) { + client_set_border_color(sel, mixedcolor); + } else { + client_set_border_color(sel, focuscolor); + if (!VISIBLEON(sel, selmon)) + focusclient(focustop(selmon, 0), 1); + } + arrange(selmon); }