summaryrefslogtreecommitdiff
path: root/drw.c
diff options
context:
space:
mode:
authorMarkus Teich <markus.teich@stusta.mhn.de>2015-04-12 22:56:56 +0200
committerMarkus Teich <markus.teich@stusta.mhn.de>2015-04-12 22:56:56 +0200
commit87ef23296b1c83f5da762da6e3177fc9f41ae281 (patch)
treed0574ce72dfd2f81238d2dfd41f9dd1f31a0ee37 /drw.c
parentedb657eb96cd3431e438140e2bcc72b1646443dd (diff)
drw: fixup drw_rect function
Diffstat (limited to 'drw.c')
-rw-r--r--drw.c16
1 files changed, 7 insertions, 9 deletions
diff --git a/drw.c b/drw.c
index 362484a..078b6b8 100644
--- a/drw.c
+++ b/drw.c
@@ -204,17 +204,15 @@ drw_setscheme(Drw *drw, Scm *scm) {
}
void
-drw_rect(Drw *drw, int x, int y, unsigned int w, unsigned int h, int filled, int empty, int invert) {
- int dx;
-
- if(!drw || !drw->fontcount || !drw->scheme)
+drw_rect(Drw *drw, int x, int y, unsigned int w, unsigned int h, int filled, int invert)
+{
+ if (!drw || !drw->scheme)
return;
XSetForeground(drw->dpy, drw->gc, invert ? drw->scheme->bg.pix : drw->scheme->fg.pix);
- dx = (drw->fonts[0]->ascent + drw->fonts[0]->descent + 2) / 4;
- if(filled)
- XFillRectangle(drw->dpy, drw->drawable, drw->gc, x+1, y+1, dx+1, dx+1);
- else if(empty)
- XDrawRectangle(drw->dpy, drw->drawable, drw->gc, x+1, y+1, dx, dx);
+ if (filled)
+ XFillRectangle(drw->dpy, drw->drawable, drw->gc, x, y, w, h);
+ else
+ XDrawRectangle(drw->dpy, drw->drawable, drw->gc, x, y, w, h);
}
int