mirror of
https://github.com/mintycube/dwm.git
synced 2024-10-22 14:05:45 +02:00
Added [dwm][patch][dragmfact] Fix patch to work with multiple monitors
This commit is contained in:
parent
ab2c5fe5da
commit
462445a378
@ -15,6 +15,8 @@ Refer to [https://dwm.suckless.org/](https://dwm.suckless.org/) for details on t
|
||||
|
||||
### Changelog:
|
||||
|
||||
2019-12-15 - Updated dragmfact patch to include fix patch to make it work with multiple monitors
|
||||
|
||||
2019-11-26 - Added dmenumatchtop patch, added improvements to the switchtag patch based on ideas from the switchtotag patch
|
||||
|
||||
2019-11-21 - Added fakefullscreenclient patch
|
||||
|
27
dwm.c
27
dwm.c
@ -2405,9 +2405,13 @@ resizemouse(const Arg *arg)
|
||||
if (c->isfloating || NULL == c->mon->lt[c->mon->sellt]->arrange) {
|
||||
XWarpPointer (dpy, None, c->win, 0, 0, 0, 0,
|
||||
horizcorner ? (-c->bw) : (c->w + c->bw - 1),
|
||||
vertcorner ? (-c->bw) : (c->h + c->bw - 1));
|
||||
vertcorner ? (-c->bw) : (c->h + c->bw - 1)
|
||||
);
|
||||
} else {
|
||||
XWarpPointer(dpy, None, root, 0, 0, 0, 0, selmon->mw * selmon->mfact, selmon->mh / 2);
|
||||
XWarpPointer(dpy, None, root, 0, 0, 0, 0,
|
||||
selmon->mx + (selmon->ww * selmon->mfact),
|
||||
selmon->my + (selmon->wh / 2)
|
||||
);
|
||||
}
|
||||
#else
|
||||
XWarpPointer (dpy, None, c->win, 0, 0, 0, 0,
|
||||
@ -2418,7 +2422,10 @@ resizemouse(const Arg *arg)
|
||||
if (c->isfloating || NULL == c->mon->lt[c->mon->sellt]->arrange) {
|
||||
XWarpPointer(dpy, None, c->win, 0, 0, 0, 0, c->w + c->bw - 1, c->h + c->bw - 1);
|
||||
} else {
|
||||
XWarpPointer(dpy, None, root, 0, 0, 0, 0, selmon->mw * selmon->mfact, selmon->mh / 2);
|
||||
XWarpPointer(dpy, None, root, 0, 0, 0, 0,
|
||||
selmon->mx + (selmon->ww * selmon->mfact),
|
||||
selmon->my + (selmon->wh / 2)
|
||||
);
|
||||
}
|
||||
#else
|
||||
XWarpPointer(dpy, None, c->win, 0, 0, 0, 0, c->w + c->bw - 1, c->h + c->bw - 1);
|
||||
@ -2483,9 +2490,12 @@ resizemouse(const Arg *arg)
|
||||
horizcorner ? (-c->bw) : (c->w + c->bw - 1),
|
||||
vertcorner ? (-c->bw) : (c->h + c->bw - 1));
|
||||
} else {
|
||||
selmon->mfact = (double) ev.xmotion.x / (double) selmon->mw;
|
||||
selmon->mfact = (double) (ev.xmotion.x_root - selmon->mx) / (double) selmon->ww;
|
||||
arrange(selmon);
|
||||
XWarpPointer(dpy, None, root, 0, 0, 0, 0, selmon->mw * selmon->mfact, selmon->mh / 2);
|
||||
XWarpPointer(dpy, None, root, 0, 0, 0, 0,
|
||||
selmon->mx + (selmon->ww * selmon->mfact),
|
||||
selmon->my + (selmon->wh / 2)
|
||||
);
|
||||
}
|
||||
#else
|
||||
XWarpPointer(dpy, None, c->win, 0, 0, 0, 0,
|
||||
@ -2496,9 +2506,12 @@ resizemouse(const Arg *arg)
|
||||
if (c->isfloating || NULL == c->mon->lt[c->mon->sellt]->arrange) {
|
||||
XWarpPointer(dpy, None, c->win, 0, 0, 0, 0, c->w + c->bw - 1, c->h + c->bw - 1);
|
||||
} else {
|
||||
selmon->mfact = (double) ev.xmotion.x / (double) selmon->mw;
|
||||
selmon->mfact = (double) (ev.xmotion.x_root - selmon->mx) / (double) selmon->ww;
|
||||
arrange(selmon);
|
||||
XWarpPointer(dpy, None, root, 0, 0, 0, 0, selmon->mw * selmon->mfact, selmon->mh / 2);
|
||||
XWarpPointer(dpy, None, root, 0, 0, 0, 0,
|
||||
selmon->mx + (selmon->ww * selmon->mfact),
|
||||
selmon->my + (selmon->wh / 2)
|
||||
);
|
||||
}
|
||||
#else
|
||||
XWarpPointer(dpy, None, c->win, 0, 0, 0, 0, c->w + c->bw - 1, c->h + c->bw - 1);
|
||||
|
Loading…
Reference in New Issue
Block a user