aboutsummarylogtreecommitdiffstats
path: root/dwm.c
diff options
context:
space:
mode:
authorHiltjo Posthuma2015-10-20 23:34:49 +0200
committerHiltjo Posthuma2015-10-20 23:38:31 +0200
commitb936227d22c1e6b1241a6f667377bf9eff3b5307 (patch)
tree882ab86c88edf3e65d22d772d97868766fa86d37 /dwm.c
parent80fe4dee99c405f301b37f94caf3ed2239d7fbc2 (diff)
downloadaur-b936227d22c1e6b1241a6f667377bf9eff3b5307.tar.gz
sync updated drw code from dmenu
important: - drw_rect: didn't use w and h, change the dwm code accordingly. - drw_text: text is NULL is not allowed, use drw_rect().
Diffstat (limited to 'dwm.c')
-rw-r--r--dwm.c10
1 files changed, 6 insertions, 4 deletions
diff --git a/dwm.c b/dwm.c
index 6295831b9760..96b43f7edfb2 100644
--- a/dwm.c
+++ b/dwm.c
@@ -689,10 +689,12 @@ dirtomon(int dir) {
void
drawbar(Monitor *m) {
- int x, xx, w;
+ int x, xx, w, dx;
unsigned int i, occ = 0, urg = 0;
Client *c;
+ dx = (drw->fonts[0]->ascent + drw->fonts[0]->descent + 2) / 4;
+
for(c = m->clients; c; c = c->next) {
occ |= c->tags;
if(c->isurgent)
@@ -703,7 +705,7 @@ drawbar(Monitor *m) {
w = TEXTW(tags[i]);
drw_setscheme(drw, m->tagset[m->seltags] & 1 << i ? &scheme[SchemeSel] : &scheme[SchemeNorm]);
drw_text(drw, x, 0, w, bh, tags[i], urg & 1 << i);
- drw_rect(drw, x, 0, w, bh, m == selmon && selmon->sel && selmon->sel->tags & 1 << i,
+ drw_rect(drw, x + 1, 1, dx, dx, m == selmon && selmon->sel && selmon->sel->tags & 1 << i,
occ & 1 << i, urg & 1 << i);
x += w;
}
@@ -728,11 +730,11 @@ drawbar(Monitor *m) {
if(m->sel) {
drw_setscheme(drw, m == selmon ? &scheme[SchemeSel] : &scheme[SchemeNorm]);
drw_text(drw, x, 0, w, bh, m->sel->name, 0);
- drw_rect(drw, x, 0, w, bh, m->sel->isfixed, m->sel->isfloating, 0);
+ drw_rect(drw, x + 1, 1, dx, dx, m->sel->isfixed, m->sel->isfloating, 0);
}
else {
drw_setscheme(drw, &scheme[SchemeNorm]);
- drw_text(drw, x, 0, w, bh, NULL, 0);
+ drw_rect(drw, x, 0, w, bh, 1, 0, 1);
}
}
drw_map(drw, m->barwin, 0, 0, m->ww, bh);