[wiki] [sites] [dwm][patches] cfacts centeredmaster remove unnecessary if else || Aaron Duxler

From: <git_AT_suckless.org>
Date: Wed, 05 Jun 2019 10:55:10 +0200

commit 37cafdbec036a744f884a4e0c4f28ffd89e8c67b
Author: Aaron Duxler <aaron.duxler_AT_gmail.com>
Date: Wed Jun 5 10:57:14 2019 +0200

    [dwm][patches] cfacts centeredmaster remove unnecessary if else

diff --git a/dwm.suckless.org/patches/cfacts/dwm-cfacts_centeredmaster-6.2.diff b/dwm.suckless.org/patches/cfacts/dwm-cfacts_centeredmaster-6.2.diff
index f7309bcd..e76fc45c 100644
--- a/dwm.suckless.org/patches/cfacts/dwm-cfacts_centeredmaster-6.2.diff
+++ b/dwm.suckless.org/patches/cfacts/dwm-cfacts_centeredmaster-6.2.diff
_AT_@ -1,6 +1,6 @@
 diff -up a/config.def.h b/config.def.h
 --- a/config.def.h 2019-06-05 02:24:05.503321320 +0200
-+++ b/config.def.h 2019-06-05 03:06:51.989939224 +0200
++++ b/config.def.h 2019-06-05 10:46:48.099997829 +0200
 _AT_@ -41,6 +41,8 @@ static const Layout layouts[] = {
          { "[]=", tile }, /* first entry is default */
          { "><>", NULL }, /* no layout function means floating behavior */
_AT_@ -23,7 +23,7 @@ Only in a: config.def.h.orig
 Only in b: dwm-bottomstack-20160719-56a31dc.diff
 diff -up a/dwm.c b/dwm.c
 --- a/dwm.c 2019-06-05 02:25:40.169986187 +0200
-+++ b/dwm.c 2019-06-05 03:08:07.379937795 +0200
++++ b/dwm.c 2019-06-05 10:48:42.443328992 +0200
 _AT_@ -235,6 +235,8 @@ static int xerror(Display *dpy, XErrorEv
  static int xerrordummy(Display *dpy, XErrorEvent *ee);
  static int xerrorstart(Display *dpy, XErrorEvent *ee);
_AT_@ -33,7 +33,7 @@ diff -up a/dwm.c b/dwm.c
  
  /* variables */
  static const char broken[] = "broken";
-_AT_@ -2175,3 +2177,146 @@ main(int argc, char *argv[])
+_AT_@ -2175,3 +2177,139 @@ main(int argc, char *argv[])
          XCloseDisplay(dpy);
          return EXIT_SUCCESS;
  }
_AT_@ -87,15 +87,8 @@ diff -up a/dwm.c b/dwm.c
 + /* nmaster clients are stacked vertically, in the center
 + * of the screen */
 + h = (m->wh - my) * (c->cfact / mfacts);
-+ if(m->nmaster >= n)
-+ resize(c, m->wx + mx, m->wy + my, mw - 2*c->bw,
-+ h - 2*c->bw, 0);
-+ else if(m->nmaster + 1 < n)
-+ resize(c, m->wx + mx, m->wy + my, mw - 2*(c->bw),
-+ h - 2*c->bw, 0);
-+ else
-+ resize(c, m->wx + mx, m->wy + my, mw - 2*(c->bw),
-+ h - 2*c->bw, 0);
++ resize(c, m->wx + mx, m->wy + my, mw - 2*c->bw,
++ h - 2*c->bw, 0);
 + my += HEIGHT(c);
 + mfacts -= c->cfact;
 + } else {
Received on Wed Jun 05 2019 - 10:55:10 CEST

This archive was generated by hypermail 2.3.0 : Wed Jun 05 2019 - 11:00:28 CEST