make drag mfact compatible with pertag

This commit is contained in:
Jakub 2024-05-15 16:08:05 -04:00
parent 9ef6996bd6
commit c88efa050f

6
dwm.c
View File

@ -1672,6 +1672,7 @@ void
resizemouse(const Arg *arg)
{
int ocx, ocy, nw, nh;
unsigned int i;
Client *c;
Monitor *m;
XEvent ev;
@ -1717,6 +1718,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;