X-Git-Url: http://git.hungrycats.org/cgi-bin/gitweb.cgi?p=xscreensaver;a=blobdiff_plain;f=hacks%2Fdistort.c;h=dc8852d01cf79db38b4f22763288c675447fa524;hp=7eed6281c8b9c4d3ecef180c77956506ae080fd9;hb=f65151994eba80ecabcdac6eef6fa0dde7e2d45b;hpb=8e0f39b4a12b9a908af2b3b175ebe87c14b4a6ab diff --git a/hacks/distort.c b/hacks/distort.c index 7eed6281..dc8852d0 100644 --- a/hacks/distort.c +++ b/hacks/distort.c @@ -432,8 +432,8 @@ void reflect_draw(int k) else { int x = xy_coo[k].x + cx + (lx * rsq / dist); int y = xy_coo[k].y + cy + (ly * rsq / dist); - if (x < 0 || x > xgwa.width || - y < 0 || y > xgwa.height) + if (x < 0 || x >= xgwa.width || + y < 0 || y >= xgwa.height) XPutPixel( buffer_map, j, i, black_pixel ); else XPutPixel( buffer_map, j, i, @@ -592,7 +592,8 @@ void screenhack(Display *dpy, Window window) draw(k); } - XSync(dpy, True); + XSync(dpy, False); + screenhack_handle_events (dpy); if (delay) usleep(delay); }