X-Git-Url: http://www.chiark.greenend.org.uk/ucgi/~ian/git?p=chiark-utils.git;a=blobdiff_plain;f=cprogs%2Fxacpi-simple.c;h=bb5cb651c16ff2861eac2990ae62b2c367ac29eb;hp=96ba1051a6097b746e4fe8a60d58488868d09454;hb=9505a5da7e5a0f6172116e66a944db2fc17a67f1;hpb=ea390adc72dc10795b3e09cc9e569dd3b572528d 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");