diff options
author | cinap_lenrek <cinap_lenrek@gmx.de> | 2013-08-12 23:31:53 +0200 |
---|---|---|
committer | cinap_lenrek <cinap_lenrek@gmx.de> | 2013-08-12 23:31:53 +0200 |
commit | 883ded7b49fc9775d5bca5cb03dcec6d006dc92d (patch) | |
tree | 8726c9fd79cc3761fbb208b40b3d917b4f687cfe | |
parent | 09d3dbc74199e0c181e09f51c8f88e94c1c6adcb (diff) |
catclock: protect black border with clip rectangle and dont print when window is too small
-rw-r--r-- | sys/src/games/catclock.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/sys/src/games/catclock.c b/sys/src/games/catclock.c index cece3991f..a581bc54d 100644 --- a/sys/src/games/catclock.c +++ b/sys/src/games/catclock.c @@ -83,7 +83,6 @@ redraw(Image *screen) Rectangle r = Rect(0,0,Dx(screen->r), Dy(screen->r)); catoffs.x=(Dx(r)-CATWID)/2; catoffs.y=(Dy(r)-CATHGT)/2; - if(!ptinrect(catoffs, r)) fprint(2, "catclock: window too small, resize!\n"); xredraw=1; } @@ -227,6 +226,7 @@ drawclock(void){ if(xredraw){ draw(screen, screen->r, display->white, nil, ZP); border(screen, screen->r, 4, display->black, ZP); + replclipr(screen, 0, insetrect(screen->r, 4)); //bitblt(&screen, screen.r.min, &screen, screen.r, Zero); //border(&screen, screen.r, 4, F); } |