mirror of
https://codeberg.org/dwl/dwl.git
synced 2025-01-15 05:17:29 -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
|
/* Don't change border color if there is an exclusive focus or we are
|
||||||
* handling a drag operation */
|
* 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);
|
client_set_border_color(c, focuscolor);
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
/* Deactivate old client if focus is changing */
|
/* Deactivate old client if focus is changing */
|
||||||
if (old && (!c || client_surface(c) != old)) {
|
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
|
/* Don't deactivate old client if the new one wants focus, as this causes issues with winecfg
|
||||||
* and probably other clients */
|
* and probably other clients */
|
||||||
} else if (old_c && !client_is_unmanaged(old_c) && (!c || !client_wants_focus(c))) {
|
} 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_set_border_color(old_c, bordercolor);
|
||||||
|
|
||||||
client_activate_surface(old, 0);
|
client_activate_surface(old, 0);
|
||||||
|
@ -2884,6 +2892,15 @@ togglesticky(const Arg *arg)
|
||||||
if (!sel)
|
if (!sel)
|
||||||
return;
|
return;
|
||||||
sel->issticky = !sel->issticky;
|
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);
|
arrange(selmon);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue