dwm

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

commit ace9a000558b5e3b82118c3878e3556dd2ddb5cf
parent 4a18af448ed6cb2f2ec914bdc02eb78ffcec88b3
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