summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
-rw-r--r--patch/status2d.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/patch/status2d.c b/patch/status2d.c
index c2c3d75..261a572 100644
--- a/patch/status2d.c
+++ b/patch/status2d.c
@@ -108,6 +108,11 @@ drawstatusbar(Monitor *m, int bh, char* stext, int stw, int stp)
while (text[++i] != ',');
int rh = atoi(text + ++i);
+ if (ry < 0)
+ ry = 0;
+ if (rx < 0)
+ rx = 0;
+
drw_rect(drw, rx + x, ry, rw, rh, 1, 0);
} else if (text[i] == 'f') {
x += atoi(text + ++i);
@@ -172,4 +177,4 @@ status2dtextlength(char* stext)
else
isCode = 0;
return w;
-} \ No newline at end of file
+}