[wiki] [sites] adds patch for dwm 6.2 and makes desc. readable || Eduardo
commit bc2533ed5e965769358ee7db93ac380b69912529
Author: Eduardo <edusilvae621_AT_gmail.com>
Date: Thu Jun 11 21:06:34 2020 -0300
adds patch for dwm 6.2 and makes desc. readable
diff --git a/dwm.suckless.org/patches/resizecorners/dwm-resizecorners-6.2.diff b/dwm.suckless.org/patches/resizecorners/dwm-resizecorners-6.2.diff
new file mode 100644
index 00000000..72d50f6d
--- /dev/null
+++ b/dwm.suckless.org/patches/resizecorners/dwm-resizecorners-6.2.diff
_AT_@ -0,0 +1,65 @@
+--- a/dwm.c 2019-02-02 10:55:28.000000000 -0200
++++ b/dwm.c 2020-06-11 20:09:16.786504007 -0300
+_AT_@ -1291,9 +1291,14 @@
+ resizemouse(const Arg *arg)
+ {
+ int ocx, ocy, nw, nh;
++ int ocx2, ocy2, nx, ny;
+ Client *c;
+ Monitor *m;
+ XEvent ev;
++ int horizcorner, vertcorner;
++ int di;
++ unsigned int dui;
++ Window dummy;
+ Time lasttime = 0;
+
+ if (!(c = selmon->sel))
+_AT_@ -1303,10 +1308,18 @@
+ restack(selmon);
+ ocx = c->x;
+ ocy = c->y;
++ ocx2 = c->x + c->w;
++ ocy2 = c->y + c->h;
+ if (XGrabPointer(dpy, root, False, MOUSEMASK, GrabModeAsync, GrabModeAsync,
+ None, cursor[CurResize]->cursor, CurrentTime) != GrabSuccess)
+ return;
+- XWarpPointer(dpy, None, c->win, 0, 0, 0, 0, c->w + c->bw - 1, c->h + c->bw - 1);
++ if (!XQueryPointer (dpy, c->win, &dummy, &dummy, &di, &di, &nx, &ny, &dui))
++ return;
++ horizcorner = nx < c->w / 2;
++ vertcorner = ny < c->h / 2;
++ 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));
+ do {
+ XMaskEvent(dpy, MOUSEMASK|ExposureMask|SubstructureRedirectMask, &ev);
+ switch(ev.type) {
+_AT_@ -1322,6 +1335,11 @@
+
+ nw = MAX(ev.xmotion.x - ocx - 2 * c->bw + 1, 1);
+ nh = MAX(ev.xmotion.y - ocy - 2 * c->bw + 1, 1);
++ nx = horizcorner ? ev.xmotion.x : c->x;
++ ny = vertcorner ? ev.xmotion.y : c->y;
++ nw = MAX(horizcorner ? (ocx2 - nx) : (ev.xmotion.x - ocx - 2 * c->bw + 1), 1);
++ nh = MAX(vertcorner ? (ocy2 - ny) : (ev.xmotion.y - ocy - 2 * c->bw + 1), 1);
++
+ if (c->mon->wx + nw >= selmon->wx && c->mon->wx + nw <= selmon->wx + selmon->ww
+ && c->mon->wy + nh >= selmon->wy && c->mon->wy + nh <= selmon->wy + selmon->wh)
+ {
+_AT_@ -1330,11 +1348,13 @@
+ togglefloating(NULL);
+ }
+ if (!selmon->lt[selmon->sellt]->arrange || c->isfloating)
+- resize(c, c->x, c->y, nw, nh, 1);
++ resize(c, nx, ny, nw, nh, 1);
+ break;
+ }
+ } while (ev.type != ButtonRelease);
+- XWarpPointer(dpy, None, c->win, 0, 0, 0, 0, c->w + c->bw - 1, c->h + c->bw - 1);
++ 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));
+ XUngrabPointer(dpy, CurrentTime);
+ while (XCheckMaskEvent(dpy, EnterWindowMask, &ev));
+ if ((m = recttomon(c->x, c->y, c->w, c->h)) != selmon) {
diff --git a/dwm.suckless.org/patches/resizecorners/index.md b/dwm.suckless.org/patches/resizecorners/index.md
index d4c7e188..49333ac6 100644
--- a/dwm.suckless.org/patches/resizecorners/index.md
+++ b/dwm.suckless.org/patches/resizecorners/index.md
_AT_@ -3,11 +3,12 @@ resizecorners
Description
-----------
-By default, windows only from the bottom right corner. With this Patch, the
-mouse is warped to the nearest corner and you resize from there.
+By default, windows can only be resized from the bottom right corner. With this Patch, the
+mouse is warped to the nearest corner and you resize it from there.
Download
--------
+* [dwm-resizecorners-6.2.diff](dwm-resizecorners-6.2.diff) (03.02.2019)
* [dwm-resizecorners-6.1.diff](dwm-resizecorners-6.1.diff) (17.02.2016)
* [dwm-resizecorners-6.0.diff](dwm-resizecorners-6.0.diff) (12.05.2015)
_AT_@ -15,3 +16,4 @@ Author
------
* dusty - <dusty_AT_teknik.io>
* Klemens Nanni <kl3_AT_posteo.org> (6.1 version)
+* doodoo <doodoo_AT_cock.li> (6.2 version)
Received on Fri Jun 12 2020 - 02:09:23 CEST
This archive was generated by hypermail 2.3.0
: Fri Jun 12 2020 - 02:12:48 CEST