mclock really is the bomb.  it's become pretty popular at coraid.
someone noticed if mclock is unhiden, it doesn't redraw.  i believe
this patch corrects the problem.

- erik

; diff -c mclock.c `{yesterday mclock.c}
mclock.c:190,195 - /n/dump/2007/1221/sys/src/games/mclock/mclock.c:190,198
        newtime = time(0);
        tm = *localtime(newtime);
  
+       if(tm.min == m && eqrect(screen->r, r))
+               return;
+ 
        anghr = (tm.hour*5+(tm.min+6)/12)*6;
        angmin = tm.min*6;
        m = tm.min;
mclock.c:275,281 - /n/dump/2007/1221/sys/src/games/mclock/mclock.c:278,284
        char *mstr[] = {"exit", 0};
        int key, timer;
  
-       initdraw(0, 0,"mclock");
+       initdraw(0,0,"clock");
        back = allocimagemix(display, DPalebluegreen, DWhite);
  
        dots = allocimage(display, Rect(0,0,1,1), CMAP8, 1, DBlue);

Reply via email to