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:
Guido Cella
2026-09-15 22:17:24 +02:00
parent f6e3a2826e
commit 6013835337
+1
View File
@@ -1540,6 +1540,7 @@ focusclient(Client *c, int lift)
} else if (old_c && old_c == exclusive_focus && client_wants_focus(old_c)) {
return;
} else if (old_c && !client_is_unmanaged(old_c)) {
if (c && !client_is_unmanaged(c))
client_set_border_color(old_c, bordercolor);
client_activate_surface(old, 0);