X-Git-Url: http://git.hungrycats.org/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=hacks%2Fepicycle.c;h=b812e6ae38968adb6e036c9b8aed8d5e8e43c294;hb=278c59e14c53fd412b734e699bd4f314f766f804;hp=addaaaaf4365253deca7bfded1ab504660d2e797;hpb=c6b273ef7292ba10943694df1656b05203d7b62f;p=xscreensaver diff --git a/hacks/epicycle.c b/hacks/epicycle.c index addaaaaf..b812e6ae 100644 --- a/hacks/epicycle.c +++ b/hacks/epicycle.c @@ -50,8 +50,8 @@ char *progclass="Epicycle"; * to get pleasing figures. */ char *defaults [] = { - "*background: black", - "*foreground: white", + ".background: black", + ".foreground: white", "*colors: 100", "*color0: red", "*delay: 1000", @@ -534,6 +534,10 @@ check_events (void) /* X event handler [ rhess ] */ printf("re-mapped!\n"); unmapped = 0; break; + + default: + screenhack_handle_event(dpy, &e); + break; } /* If we're unmapped, don't return to the caller. This @@ -580,8 +584,11 @@ setup(void) } else { - XSelectInput(dpy, window, - ExposureMask|ButtonPressMask|StructureNotifyMask); + XWindowAttributes xgwa; + XGetWindowAttributes (dpy, window, &xgwa); + XSelectInput (dpy, window, + xgwa.your_event_mask | ExposureMask | + ButtonPressMask |StructureNotifyMask); } } @@ -814,6 +821,7 @@ screenhack(Display *disp, Window win) { XSync (dpy, False); + check_events(); if (holdtime) sleep(holdtime); /* show complete figure for a bit. */ @@ -821,6 +829,7 @@ screenhack(Display *disp, Window win) } + check_events(); if (delay) usleep (delay);