mirror of
https://codeberg.org/dwl/dwl.git
synced 2026-09-19 13:52:48 +00:00
keep the focused border color of the old client in certain cases
When focusing an unmanaged client (like dmenu) or a layer shell surface (like wmenu) keep the focused border color of the regular client, but still deactivate it. This is consistent with dwm and sway. This was already done for unmanaged clients but not for layer shell surfaces. This is not perfect because you can press MODKEY+j/k or move the cursor while a program like dmenu is focused and have 2 clients with focused border color after closing dmenu. But this doesn't work well even in sway where if you change focus while dmenu is open you can longer focus it, and after closing a layer shell surface with on-demand keyboard interactivity all toplevels have the focused border color, so this will do for now.
This commit is contained in:
@@ -1540,7 +1540,8 @@ focusclient(Client *c, int lift)
|
|||||||
} else if (old_c && old_c == exclusive_focus && client_wants_focus(old_c)) {
|
} else if (old_c && old_c == exclusive_focus && client_wants_focus(old_c)) {
|
||||||
return;
|
return;
|
||||||
} else if (old_c && !client_is_unmanaged(old_c)) {
|
} else if (old_c && !client_is_unmanaged(old_c)) {
|
||||||
client_set_border_color(old_c, bordercolor);
|
if (c && !client_is_unmanaged(c))
|
||||||
|
client_set_border_color(old_c, bordercolor);
|
||||||
|
|
||||||
client_activate_surface(old, 0);
|
client_activate_surface(old, 0);
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user