[wiki] [sites] [dwm][patch][rmaster] Fix failure when patched (6.2) || Rizqi Nur Assyaufi

From: <git_AT_suckless.org>
Date: Sun, 08 Aug 2021 12:34:16 +0200

commit 51a4c50fb3e023c185031344b682a44a37ea33ed
Author: Rizqi Nur Assyaufi <bandithijo_AT_gmail.com>
Date: Sun Aug 8 18:27:59 2021 +0800

    [dwm][patch][rmaster] Fix failure when patched (6.2)
    
    Following the Project ideas > Current small tasks about Fix broken
    patches on the wiki.
    I've been checking gunther.suckless.org/patches and found that
    dwm-rmaster-6.2 patch had status failed.
    I have fixed the patch and have successfully tested.
    There is only very minor mistake, about mistaken hunk range information.

diff --git a/dwm.suckless.org/patches/rmaster/dwm-rmaster-6.2.diff b/dwm.suckless.org/patches/rmaster/dwm-rmaster-6.2.diff
index 1da89381..3a9088b3 100644
--- a/dwm.suckless.org/patches/rmaster/dwm-rmaster-6.2.diff
+++ b/dwm.suckless.org/patches/rmaster/dwm-rmaster-6.2.diff
_AT_@ -39,7 +39,7 @@ index 1c0b587..1d00282 100644
          { MODKEY|ShiftMask, XK_0, tag, {.ui = ~0 } },
          { MODKEY, XK_comma, focusmon, {.i = -1 } },
 diff --git a/dwm.c b/dwm.c
-index 664c527..cc9a7f6 100644
+index 4465af1..a2d118b 100644
 --- a/dwm.c
 +++ b/dwm.c
 _AT_@ -122,6 +122,7 @@ struct Monitor {
_AT_@ -50,7 +50,7 @@ index 664c527..cc9a7f6 100644
          int showbar;
          int topbar;
          Client *clients;
-_AT_@ -212,6 +213,7 @@ static void tagmon(const Arg *arg);
+_AT_@ -211,6 +212,7 @@ static void tagmon(const Arg *arg);
  static void tile(Monitor *);
  static void togglebar(const Arg *arg);
  static void togglefloating(const Arg *arg);
_AT_@ -58,7 +58,7 @@ index 664c527..cc9a7f6 100644
  static void toggletag(const Arg *arg);
  static void toggleview(const Arg *arg);
  static void unfocus(Client *c, int setfocus);
-_AT_@ -637,6 +639,7 @@ createmon(void)
+_AT_@ -636,6 +638,7 @@ createmon(void)
          m->tagset[0] = m->tagset[1] = 1;
          m->mfact = mfact;
          m->nmaster = nmaster;
_AT_@ -66,7 +66,7 @@ index 664c527..cc9a7f6 100644
          m->showbar = showbar;
          m->topbar = topbar;
          m->lt[0] = &layouts[0];
-_AT_@ -1682,18 +1685,22 @@ tile(Monitor *m)
+_AT_@ -1681,17 +1684,21 @@ tile(Monitor *m)
                  return;
  
          if (n > m->nmaster)
_AT_@ -82,17 +82,16 @@ index 664c527..cc9a7f6 100644
 - resize(c, m->wx, m->wy + my, mw - (2*c->bw), h - (2*c->bw), 0);
 + resize(c, m->rmaster ? m->wx + m->ww - mw : m->wx,
 + m->wy + my, mw - (2*c->bw), h - (2*c->bw), 0);
- if (my + HEIGHT(c) < m->wh)
- my += HEIGHT(c);
+ my += HEIGHT(c);
                  } else {
                          h = (m->wh - ty) / (n - i);
 - resize(c, m->wx + mw, m->wy + ty, m->ww - mw - (2*c->bw), h - (2*c->bw), 0);
 + resize(c, m->rmaster ? m->wx : m->wx + mw, m->wy + ty,
 + m->ww - mw - (2*c->bw), h - (2*c->bw), 0);
- if (ty + HEIGHT(c) < m->wh)
- ty += HEIGHT(c);
+ ty += HEIGHT(c);
                  }
-_AT_@ -1722,6 +1729,16 @@ togglefloating(const Arg *arg)
+ }
+_AT_@ -1719,6 +1726,16 @@ togglefloating(const Arg *arg)
          arrange(selmon);
  }
  
_AT_@ -110,5 +109,5 @@ index 664c527..cc9a7f6 100644
  toggletag(const Arg *arg)
  {
 --
-2.29.2
+2.31.1
 
Received on Sun Aug 08 2021 - 12:34:16 CEST

This archive was generated by hypermail 2.3.0 : Sun Aug 08 2021 - 12:36:40 CEST