dwm

Fork of suckless' dwm with my personal patches
git clone https://git.instinctive.eu/dwm.git
Log | Files | Refs | README | LICENSE

commit bc1d4e6310572e1851a614bcac9c4262b838cc31
parent 2ea8a8197827c14c0fdbb62c7c85aec4bc82719c
Author: Natasha Kerensikova <natacha@instinctive.eu>
Date:   Fri,  3 May 2024 17:08:43 +0200

[nat] focus under mouse after swapmon and swapmonvisible

Diffstat:
Mdwm.c | 11++++-------
1 file changed, 4 insertions(+), 7 deletions(-)

diff --git a/dwm.c b/dwm.c @@ -2087,6 +2087,7 @@ swapmon(const Arg *arg) if (!mons->next) return; + unfocus(selmon->sel, 1); targetmon = dirtomon(arg->i); tmp = *selmon; @@ -2127,8 +2128,8 @@ swapmon(const Arg *arg) c->mon = targetmon; arrange(selmon); - focus(targetmon->sel); arrange(targetmon); + focus(getclientundermouse()); } void @@ -2137,7 +2138,6 @@ swapmonvisible(const Arg *arg) Client **tc, *c; Client *firstnew = NULL; Client **dest; - Client *selc = selmon->sel; Monitor *targetmon; unsigned int tagset = selmon->tagset[selmon->seltags]; @@ -2278,11 +2278,8 @@ swapmonvisible(const Arg *arg) /* Refocus and rearrange */ arrange(NULL); - - if (selc && ISVISIBLE(selc)) { - focus(selc); - restack(selc->mon); - } + focus(getclientundermouse()); + // drawbars(); needed? } void