summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorzachir <zachir@librem.one>2022-01-27 23:54:47 -0600
committerzachir <zachir@librem.one>2022-01-27 23:54:47 -0600
commita3bb82f2b90ebbb89cad9c4ad11ea04ec23f214d (patch)
tree03644b72843f2467f1b92ce3acdf28f9473bac7a
parentb2c2987873cb7015421e3a3e903e30f2207a6500 (diff)
fix typo which broke cfacts/mfacts
-rw-r--r--dwm.c1
-rw-r--r--patch.diff31
2 files changed, 15 insertions, 17 deletions
diff --git a/dwm.c b/dwm.c
index 9d8e65d..7a9aee6 100644
--- a/dwm.c
+++ b/dwm.c
@@ -2298,7 +2298,6 @@ tile(Monitor *m)
if (i < m->nmaster) {
h = (m->wh - my) * (c->cfact / mfacts);
resize(c, m->wx, m->wy + my, mw - (2*c->bw), h - (2*c->bw), 0);
- my += HEIGHT(c);
if (my + HEIGHT(c) < m->wh)
my += HEIGHT(c);
mfacts -= c->cfact;
diff --git a/patch.diff b/patch.diff
index 3d1fbf9..7e40ca2 100644
--- a/patch.diff
+++ b/patch.diff
@@ -293,7 +293,7 @@ index ddc8321..2da95f5 100644
.BR dmenu (1),
.BR st (1)
diff --git a/dwm.c b/dwm.c
-index a96f33c..9d8e65d 100644
+index a96f33c..7a9aee6 100644
--- a/dwm.c
+++ b/dwm.c
@@ -40,6 +40,8 @@
@@ -1553,7 +1553,7 @@ index a96f33c..9d8e65d 100644
if (n == 0)
return;
-@@ -1690,15 +2296,18 @@ tile(Monitor *m)
+@@ -1690,15 +2296,17 @@ tile(Monitor *m)
mw = m->ww;
for (i = my = ty = 0, c = nexttiled(m->clients); c; c = nexttiled(c->next), i++)
if (i < m->nmaster) {
@@ -1562,7 +1562,6 @@ index a96f33c..9d8e65d 100644
resize(c, 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);
+ if (my + HEIGHT(c) < m->wh)
+ my += HEIGHT(c);
+ mfacts -= c->cfact;
@@ -1578,7 +1577,7 @@ index a96f33c..9d8e65d 100644
}
}
-@@ -1707,7 +2316,18 @@ togglebar(const Arg *arg)
+@@ -1707,7 +2315,18 @@ togglebar(const Arg *arg)
{
selmon->showbar = !selmon->showbar;
updatebarpos(selmon);
@@ -1598,7 +1597,7 @@ index a96f33c..9d8e65d 100644
arrange(selmon);
}
-@@ -1725,6 +2345,39 @@ togglefloating(const Arg *arg)
+@@ -1725,6 +2344,39 @@ togglefloating(const Arg *arg)
arrange(selmon);
}
@@ -1638,7 +1637,7 @@ index a96f33c..9d8e65d 100644
void
toggletag(const Arg *arg)
{
-@@ -1771,6 +2424,20 @@ unmanage(Client *c, int destroyed)
+@@ -1771,6 +2423,20 @@ unmanage(Client *c, int destroyed)
Monitor *m = c->mon;
XWindowChanges wc;
@@ -1659,7 +1658,7 @@ index a96f33c..9d8e65d 100644
detach(c);
detachstack(c);
if (!destroyed) {
-@@ -1785,9 +2452,12 @@ unmanage(Client *c, int destroyed)
+@@ -1785,9 +2451,12 @@ unmanage(Client *c, int destroyed)
XUngrabServer(dpy);
}
free(c);
@@ -1675,7 +1674,7 @@ index a96f33c..9d8e65d 100644
}
void
-@@ -1802,11 +2472,18 @@ unmapnotify(XEvent *e)
+@@ -1802,11 +2471,18 @@ unmapnotify(XEvent *e)
else
unmanage(c, 0);
}
@@ -1694,7 +1693,7 @@ index a96f33c..9d8e65d 100644
Monitor *m;
XSetWindowAttributes wa = {
.override_redirect = True,
-@@ -1817,10 +2494,15 @@ updatebars(void)
+@@ -1817,10 +2493,15 @@ updatebars(void)
for (m = mons; m; m = m->next) {
if (m->barwin)
continue;
@@ -1711,7 +1710,7 @@ index a96f33c..9d8e65d 100644
XMapRaised(dpy, m->barwin);
XSetClassHint(dpy, m->barwin, &ch);
}
-@@ -1903,7 +2585,10 @@ updategeom(void)
+@@ -1903,7 +2584,10 @@ updategeom(void)
m->clients = c->next;
detachstack(c);
c->mon = mons;
@@ -1723,7 +1722,7 @@ index a96f33c..9d8e65d 100644
attachstack(c);
}
if (m == selmon)
-@@ -1993,9 +2678,126 @@ updatesizehints(Client *c)
+@@ -1993,9 +2677,126 @@ updatesizehints(Client *c)
void
updatestatus(void)
{
@@ -1851,7 +1850,7 @@ index a96f33c..9d8e65d 100644
}
void
-@@ -2050,6 +2852,110 @@ view(const Arg *arg)
+@@ -2050,6 +2851,110 @@ view(const Arg *arg)
arrange(selmon);
}
@@ -1962,7 +1961,7 @@ index a96f33c..9d8e65d 100644
Client *
wintoclient(Window w)
{
-@@ -2063,6 +2969,16 @@ wintoclient(Window w)
+@@ -2063,6 +2968,16 @@ wintoclient(Window w)
return NULL;
}
@@ -1979,7 +1978,7 @@ index a96f33c..9d8e65d 100644
Monitor *
wintomon(Window w)
{
-@@ -2116,18 +3032,58 @@ xerrorstart(Display *dpy, XErrorEvent *ee)
+@@ -2116,18 +3031,58 @@ xerrorstart(Display *dpy, XErrorEvent *ee)
return -1;
}
@@ -2042,7 +2041,7 @@ index a96f33c..9d8e65d 100644
}
int
-@@ -2141,6 +3097,8 @@ main(int argc, char *argv[])
+@@ -2141,6 +3096,8 @@ main(int argc, char *argv[])
fputs("warning: no locale support\n", stderr);
if (!(dpy = XOpenDisplay(NULL)))
die("dwm: cannot open display");
@@ -2051,7 +2050,7 @@ index a96f33c..9d8e65d 100644
checkotherwm();
setup();
#ifdef __OpenBSD__
-@@ -2148,7 +3106,9 @@ main(int argc, char *argv[])
+@@ -2148,7 +3105,9 @@ main(int argc, char *argv[])
die("pledge");
#endif /* __OpenBSD__ */
scan();