From 9505a5da7e5a0f6172116e66a944db2fc17a67f1 Mon Sep 17 00:00:00 2001 From: ianmdlvl Date: Sat, 11 Dec 2004 13:26:52 +0000 Subject: [PATCH 1/1] remove debugging and cruft; size window more sensibly --- cprogs/xacpi-simple.c | 15 ++------------- 1 file changed, 2 insertions(+), 13 deletions(-) diff --git a/cprogs/xacpi-simple.c b/cprogs/xacpi-simple.c index 96ba105..bb5cb65 100644 --- a/cprogs/xacpi-simple.c +++ b/cprogs/xacpi-simple.c @@ -50,9 +50,6 @@ static void show(double fill_norm, double ratepersec_norm, int ac) { then >= 1.0 ? width : width * then; -fprintf(stderr," width=%d height=%d i=%d elap=%f then=%f leftmost_lit=%d\n", - (unsigned long)w, - width,height,i,then,leftmost_lit); if (leftmost_lit >= 0) XDrawLine(d, w, ac ? gc_blue : gc_green, 0,i, leftmost_lit,i); if (leftmost_lit < width) @@ -80,8 +77,6 @@ static void colour(GC *gc_r, const char *name) { } int main(int argc, const char *const *argv) { - const char *windowid_string; - char *ep; XEvent ev; d= XOpenDisplay(0); if (!d) fail("could not open display"); @@ -89,20 +84,14 @@ int main(int argc, const char *const *argv) { if (!argv[0] || argv[1]) badusage(); - /* if (!(windowid_string= getenv("WINDOWID"))) - badusage(); w= strtoul(windowid_string,&ep,0); - if (*ep) badusage(); - -*/ - screen= DefaultScreen(d); - w= XCreateSimpleWindow(d,DefaultRootWindow(d),0,0,50,50,0,0,0); + w= XCreateSimpleWindow(d,DefaultRootWindow(d),0,0,100,20,0,0,0); cmap= DefaultColormap(d,screen); colour(&gc_green, "green"); - colour(&gc_red, "darkred"); + colour(&gc_red, "red"); colour(&gc_yellow, "yellow"); colour(&gc_blue, "blue"); -- 2.30.2