X-Git-Url: http://git.hungrycats.org/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=hacks%2Fdecayscreen.c;h=fe3d108d64b4c0520d7c87faff9f7960b22ea44e;hb=6afd6db0ae9396cd7ff897ade597cd5483f49b0e;hp=42f8149a1d2d02dc79b4c30819886fc17a286af0;hpb=6f5482d73adb0165c0130bb47d852644ab0c4869;p=xscreensaver diff --git a/hacks/decayscreen.c b/hacks/decayscreen.c index 42f8149a..fe3d108d 100644 --- a/hacks/decayscreen.c +++ b/hacks/decayscreen.c @@ -1,4 +1,4 @@ -/* xscreensaver, Copyright (c) 1992-2008 Jamie Zawinski +/* xscreensaver, Copyright (c) 1992-2014 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 @@ -332,8 +332,8 @@ decayscreen_reshape (Display *dpy, Window window, void *closure, XClearWindow (st->dpy, st->window); XCopyArea (st->dpy, st->saved, st->window, st->gc, 0, 0, st->saved_w, st->saved_h, - (w - st->saved_w) / 2, - (h - st->saved_h) / 2); + ((int)w - st->saved_w) / 2, + ((int)h - st->saved_h) / 2); st->sizex = w; st->sizey = h; } @@ -341,6 +341,12 @@ decayscreen_reshape (Display *dpy, Window window, void *closure, static Bool decayscreen_event (Display *dpy, Window window, void *closure, XEvent *event) { + struct state *st = (struct state *) closure; + if (screenhack_event_helper (dpy, window, event)) + { + st->start_time = 0; + return True; + } return False; } @@ -366,6 +372,10 @@ static const char *decayscreen_defaults [] = { "*delay: 10000", "*mode: random", "*duration: 120", +#ifdef USE_IPHONE + "*ignoreRotation: True", + "*rotateImages: True", +#endif 0 };