X-Git-Url: http://git.hungrycats.org/cgi-bin/gitweb.cgi?p=xscreensaver;a=blobdiff_plain;f=hacks%2Frd-bomb.c;h=dfcc2897cab5cacf51cb1c4c0d2c1cec183b4e31;hp=3e9acbc50e3a5e95d0d892537fd70adab94af867;hb=dba664f31aa87285db4d76cf8c5e66335299703a;hpb=8afc01a67be4fbf3f1cc0fce9adf01b5289a21c6 diff --git a/hacks/rd-bomb.c b/hacks/rd-bomb.c index 3e9acbc5..dfcc2897 100644 --- a/hacks/rd-bomb.c +++ b/hacks/rd-bomb.c @@ -1,4 +1,4 @@ -/* xscreensaver, Copyright (c) 1992-2013 Jamie Zawinski +/* xscreensaver, Copyright (c) 1992-2014 Jamie Zawinski * * reaction/diffusion textures * Copyright (c) 1997 Scott Draves spot@transmeta.com @@ -100,6 +100,9 @@ pixack_init(struct state *st, int *size_h, int *size_v) if (st->width <= 0) st->width = 48 + BELLRAND(256); if (st->height <= 0) st->height = 48 + BELLRAND(256); + if (st->width > st->xgwa.width) st->width = st->xgwa.width; + if (st->height > st->xgwa.height) st->height = st->xgwa.height; + /* jwz: when (and only when) XSHM is in use on an SGI 8-bit visual, we get shear unless st->width is a multiple of 4. I don't understand why. This is undoubtedly the wrong fix... */