# HG changeset patch # User Anselm R Garbe # Date 1212317899 -3600 # Node ID 1fa12fca6c0e32830a8e716462bb3fe8d43ece41 # Parent 1fcb3350609da7d919a84d9c1ed0c25f54926904 Gottox' drawtext simplification diff -r 1fcb3350609d -r 1fa12fca6c0e config.def.h --- a/config.def.h Sun Jun 01 10:54:02 2008 +0100 +++ b/config.def.h Sun Jun 01 11:58:19 2008 +0100 @@ -24,7 +24,7 @@ /* layout(s) */ double mfact = 0.55; -Bool resizehints = True; /* False means respect size hints in tiled resizals */ +Bool resizehints = False; /* False means respect size hints in tiled resizals */ Layout layouts[] = { /* symbol arrange function */ diff -r 1fcb3350609d -r 1fa12fca6c0e dwm.c --- a/dwm.c Sun Jun 01 10:54:02 2008 +0100 +++ b/dwm.c Sun Jun 01 11:58:19 2008 +0100 @@ -571,14 +571,8 @@ for(; len && (w = textnw(buf, len)) > dc.w - h; len--); if(!len) return; - if(len < olen) { - if(len > 1) - buf[len - 1] = '.'; - if(len > 2) - buf[len - 2] = '.'; - if(len > 3) - buf[len - 3] = '.'; - } + if(len < olen) + strncpy(&buf[MAX(0, len - 3)], "...", len); XSetForeground(dpy, dc.gc, col[invert ? ColBG : ColFG]); if(dc.font.set) XmbDrawString(dpy, dc.drawable, dc.font.set, dc.gc, x, y, buf, len);