switchtag: make sure to unfocus the selected client (if any) when triggering switchtag and potentially moving to another monitor ref. #425

This commit is contained in:
bakkeby 2024-05-04 22:23:24 +02:00
parent 79404e419f
commit dd1e34dbd6

1
dwm.c
View File

@ -968,6 +968,7 @@ applyrules(Client *c)
if (r->switchtag) if (r->switchtag)
#endif // SWALLOW_PATCH #endif // SWALLOW_PATCH
{ {
unfocus(selmon->sel, 1, NULL);
selmon = c->mon; selmon = c->mon;
if (r->switchtag == 2 || r->switchtag == 4) if (r->switchtag == 2 || r->switchtag == 4)
newtagset = c->mon->tagset[c->mon->seltags] ^ c->tags; newtagset = c->mon->tagset[c->mon->seltags] ^ c->tags;