import new drw from libsl and minor fixes.

- extract drawitem function (code deduplication)
- fix bug where inputw was not correctly calculated from the widest item, but
  just from the one with the longest strlen() which is not the same. It's better
  now, but does not account for fallback fonts, since it would be too slow to
  calculate all the correct item widths on startup.
- minor code style fixes (indentation, useless line breaks)
This commit is contained in:
Markus Teich
2016-05-21 21:51:14 +02:00
committed by Hiltjo Posthuma
parent b3d9451c2d
commit 44c7de3dcf
5 changed files with 237 additions and 242 deletions

4
util.h

@ -4,5 +4,5 @@
#define MIN(A, B) ((A) < (B) ? (A) : (B))
#define BETWEEN(X, A, B) ((A) <= (X) && (X) <= (B))
void die(const char *errstr, ...);
void *ecalloc(size_t, size_t);
void die(const char *fmt, ...);
void *ecalloc(size_t nmemb, size_t size);