make drag mfact compatible with pertag

This commit is contained in:
Jakub 2024-05-15 16:08:05 -04:00
parent 3d0629b664
commit 684ff9bb71

6
dwm.c
View File

@ -1670,6 +1670,7 @@ void
resizemouse(const Arg *arg)
{
int ocx, ocy, nw, nh;
unsigned int i;
Client *c;
Monitor *m;
XEvent ev;
@ -1715,6 +1716,11 @@ resizemouse(const Arg *arg)
resize(c, c->x, c->y, nw, nh, 1);
else {
selmon->mfact = (double) (ev.xmotion.x_root - selmon->mx) / (double) selmon->ww;
for(i=0; i<LENGTH(tags); ++i)
if(selmon->tagset[selmon->seltags] & 1<<i)
selmon->pertag->mfacts[i+1] = selmon->mfact;
if(selmon->pertag->curtag == 0)
selmon->pertag->mfacts[0] = selmon->mfact;
arrange(selmon);
}
break;