[wiki] [sites] [dwm][patch][resizecorners] Updated patches 6.1 and 6.2. Old definitions of nw & nh were not getting removed. Patch 6.0 was correct. || cdarkly

From: <git_AT_suckless.org>
Date: Sun, 23 Jan 2022 22:20:08 +0100

commit 50debc289a2ad50bb45d477c112f7ba197542c64
Author: cdarkly <cdarkly_AT_protonmail.com>
Date: Sun Jan 23 16:16:21 2022 -0500

    [dwm][patch][resizecorners] Updated patches 6.1 and 6.2. Old definitions
    of nw & nh were not getting removed. Patch 6.0 was correct.

diff --git a/dwm.suckless.org/patches/resizecorners/dwm-resizecorners-6.1.diff b/dwm.suckless.org/patches/resizecorners/dwm-resizecorners-6.1.diff
index b4c8400e..f03d9fcc 100644
--- a/dwm.suckless.org/patches/resizecorners/dwm-resizecorners-6.1.diff
+++ b/dwm.suckless.org/patches/resizecorners/dwm-resizecorners-6.1.diff
_AT_@ -1,8 +1,7 @@
-diff --git a/dwm.c b/dwm.c
-index ff7e096..b6ce27c 100644
---- a/dwm.c
-+++ b/dwm.c
-_AT_@ -1313,9 +1313,14 @@ void
+diff -r -u a/dwm.c b/dwm.c
+--- a/dwm.c 2015-11-08 17:39:37.000000000 -0500
++++ b/dwm.c 2022-01-17 22:49:20.598478626 -0500
+_AT_@ -1308,9 +1308,14 @@
  resizemouse(const Arg *arg)
  {
          int ocx, ocy, nw, nh;
_AT_@ -17,7 +16,7 @@ index ff7e096..b6ce27c 100644
          Time lasttime = 0;
  
          if (!(c = selmon->sel))
-_AT_@ -1325,10 +1330,19 @@ resizemouse(const Arg *arg)
+_AT_@ -1320,10 +1325,19 @@
          restack(selmon);
          ocx = c->x;
          ocy = c->y;
_AT_@ -38,10 +37,12 @@ index ff7e096..b6ce27c 100644
          do {
                  XMaskEvent(dpy, MOUSEMASK|ExposureMask|SubstructureRedirectMask, &ev);
                  switch(ev.type) {
-_AT_@ -1344,6 +1358,11 @@ resizemouse(const Arg *arg)
+_AT_@ -1337,8 +1351,11 @@
+ continue;
+ lasttime = ev.xmotion.time;
  
- nw = MAX(ev.xmotion.x - ocx - 2 * c->bw + 1, 1);
- nh = MAX(ev.xmotion.y - ocy - 2 * c->bw + 1, 1);
+- 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);
_AT_@ -50,7 +51,7 @@ index ff7e096..b6ce27c 100644
                          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_@ -1352,11 +1371,13 @@ resizemouse(const Arg *arg)
+_AT_@ -1347,11 +1364,13 @@
                                          togglefloating(NULL);
                          }
                          if (!selmon->lt[selmon->sellt]->arrange || c->isfloating)
diff --git a/dwm.suckless.org/patches/resizecorners/dwm-resizecorners-6.2.diff b/dwm.suckless.org/patches/resizecorners/dwm-resizecorners-6.2.diff
index 72d50f6d..016351c6 100644
--- a/dwm.suckless.org/patches/resizecorners/dwm-resizecorners-6.2.diff
+++ b/dwm.suckless.org/patches/resizecorners/dwm-resizecorners-6.2.diff
_AT_@ -1,5 +1,6 @@
---- a/dwm.c 2019-02-02 10:55:28.000000000 -0200
-+++ b/dwm.c 2020-06-11 20:09:16.786504007 -0300
+diff -r -u a/dwm.c b/dwm.c
+--- a/dwm.c 2019-02-02 07:55:28.000000000 -0500
++++ b/dwm.c 2022-01-17 22:38:33.614493243 -0500
 _AT_@ -1291,9 +1291,14 @@
  resizemouse(const Arg *arg)
  {
_AT_@ -35,10 +36,12 @@
          do {
                  XMaskEvent(dpy, MOUSEMASK|ExposureMask|SubstructureRedirectMask, &ev);
                  switch(ev.type) {
-_AT_@ -1322,6 +1335,11 @@
+_AT_@ -1320,8 +1333,11 @@
+ continue;
+ lasttime = ev.xmotion.time;
  
- nw = MAX(ev.xmotion.x - ocx - 2 * c->bw + 1, 1);
- nh = MAX(ev.xmotion.y - ocy - 2 * c->bw + 1, 1);
+- 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);
_AT_@ -47,7 +50,7 @@
                          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 @@
+_AT_@ -1330,11 +1346,13 @@
                                          togglefloating(NULL);
                          }
                          if (!selmon->lt[selmon->sellt]->arrange || c->isfloating)
Received on Sun Jan 23 2022 - 22:20:08 CET

This archive was generated by hypermail 2.3.0 : Sun Jan 23 2022 - 22:24:44 CET