all repos — dwm @ 1fafcb1820d37dbf58a864f2c10e1e24ae1a21d1

my dwm build

applied Peters patch, applied yiyus hint to initfont
arg@suckless.org unknown
Wed, 19 Sep 2007 17:32:28 +0200
commit

1fafcb1820d37dbf58a864f2c10e1e24ae1a21d1

parent

08c2d924809ca6e397126532c52955c3c04237e2

1 files changed, 12 insertions(+), 12 deletions(-)

jump to
M dwm.cdwm.c

@@ -334,10 +334,10 @@ focus(c);

if(CLEANMASK(ev->state) != MODKEY) return; if(ev->button == Button1) { - if(!isarrange(floating) && !c->isfloating) - togglefloating(NULL); - else + if(isarrange(floating) || c->isfloating) restack(); + else + togglefloating(NULL); movemouse(c); } else if(ev->button == Button2) {

@@ -347,10 +347,10 @@ else

zoom(NULL); } else if(ev->button == Button3 && !c->isfixed) { - if(!isarrange(floating) && !c->isfloating) - togglefloating(NULL); - else + if(isarrange(floating) || c->isfloating) restack(); + else + togglefloating(NULL); resizemouse(c); } }

@@ -444,7 +444,7 @@ void

configurenotify(XEvent *e) { XConfigureEvent *ev = &e->xconfigure; - if (ev->window == root && (ev->width != sw || ev->height != sh)) { + if(ev->window == root && (ev->width != sw || ev->height != sh)) { sw = ev->width; sh = ev->height; XFreePixmap(dpy, dc.drawable);

@@ -883,7 +883,7 @@ if(dc.font.xfont)

XFreeFont(dpy, dc.font.xfont); dc.font.xfont = NULL; if(!(dc.font.xfont = XLoadQueryFont(dpy, fontstr)) - || !(dc.font.xfont = XLoadQueryFont(dpy, "fixed"))) + && !(dc.font.xfont = XLoadQueryFont(dpy, "fixed"))) eprint("error, cannot load font: '%s'\n", fontstr); dc.font.ascent = dc.font.xfont->ascent; dc.font.descent = dc.font.xfont->descent;

@@ -1404,10 +1404,10 @@ /* arg handling, manipulate mwfact */

if(arg == NULL) mwfact = MWFACT; else if(1 == sscanf(arg, "%lf", &delta)) { - if(arg[0] != '+' && arg[0] != '-') - mwfact = delta; - else + if(arg[0] == '+' || arg[0] == '-') mwfact += delta; + else + mwfact = delta; if(mwfact < 0.1) mwfact = 0.1; else if(mwfact > 0.9)

@@ -1644,7 +1644,7 @@ resize(sel, wax, way, waw - 2 * sel->border, wah - 2 * sel->border, True);

} else { resize(sel, sel->rx, sel->ry, sel->rw, sel->rh, True); - if (!sel->wasfloating) + if(!sel->wasfloating) togglefloating(NULL); } drawbar();