mirror of
https://codeberg.org/dwl/dwl.git
synced 2025-01-14 21:07:28 -08:00
add colors for sticky patch
This commit is contained in:
parent
34ac3849c3
commit
7208380841
1 changed files with 20 additions and 3 deletions
19
dwl.c
19
dwl.c
|
@ -1496,9 +1496,14 @@ 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)
|
||||
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 */
|
||||
if (old && (!c || client_surface(c) != old)) {
|
||||
|
@ -1514,6 +1519,9 @@ 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))) {
|
||||
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);
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue