X-Git-Url: http://git.hungrycats.org/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=hacks%2Fxroger-hack.c;h=f4fa11640811d6cd6d1ee2bf24798de6fe01b4a2;hb=f65151994eba80ecabcdac6eef6fa0dde7e2d45b;hp=32e1e4b3d90bf9d7e1acbfdcd8d461020a3e252e;hpb=f3e0240915ed9f9b3a61781f5c7002d587563fe0;p=xscreensaver diff --git a/hacks/xroger-hack.c b/hacks/xroger-hack.c index 32e1e4b3..f4fa1164 100644 --- a/hacks/xroger-hack.c +++ b/hacks/xroger-hack.c @@ -1,4 +1,4 @@ -/* xscreensaver, Copyright (c) 1991-1994 Jamie Zawinski +/* xscreensaver, Copyright (c) 1991-1994 Jamie Zawinski * * Permission to use, copy, modify, distribute, and sell this software and its * documentation for any purpose is hereby granted without fee, provided that @@ -14,8 +14,8 @@ char *progclass = "XRoger"; char *defaults [] = { - "XRoger.background: black", - "XRoger.foreground: red", + ".background: black", + ".foreground: red", "*delay: 5", 0 }; @@ -70,8 +70,11 @@ screenhack (dpy, window) x = random () % (w - ww); y = random () % (h - hh); XClearWindow (dpy, window); + + skull (dpy, window, draw_gc, erase_gc, x, y, ww, hh); - XSync (dpy, True); + XSync (dpy, False); + screenhack_handle_events (dpy); start_time = time ((time_t *) 0); if (mono_p) sleep (delay); @@ -84,7 +87,7 @@ screenhack (dpy, window) rgb_to_hsv (color2.red, color2.green, color2.blue, &H, &S, &V); V += delta; if (V >= 1.0) V = 1.0, delta = -delta; - if (V <= 0.7) V = 0.7, delta = -delta; + if (V <= 0.6) V = 0.7, delta = -delta; hsv_to_rgb (H, S, V, &color2.red, &color2.green, &color2.blue); color3 = color2; if (XAllocColor (dpy, cmap, &color3))