X-Git-Url: http://git.hungrycats.org/cgi-bin/gitweb.cgi?p=xscreensaver;a=blobdiff_plain;f=hacks%2Fspotlight.c;h=209a67c80351a7d6b5500d41db0597116342b87d;hp=8c76fc74e7faa698e036d0f5f0384f83b3fc03f3;hb=8eb2873d7054e705c4e83f22d18c40946a9e2529;hpb=a1d41b2aa6e18bf9a49b914a99dda8232c5d7762 diff --git a/hacks/spotlight.c b/hacks/spotlight.c index 8c76fc74..209a67c8 100644 --- a/hacks/spotlight.c +++ b/hacks/spotlight.c @@ -1,6 +1,6 @@ /* * spotlight - an xscreensaver module - * Copyright (c) 1999 Rick Schultz + * Copyright (c) 1999, 2001 Rick Schultz * * loosely based on the BackSpace module "StefView" by Darcy Brockbank */ @@ -93,6 +93,10 @@ init_hack (Display *dpy, Window window) radius = get_integer_resource ("radius", "Integer"); if (radius < 0) radius = 125; + /* Don't let the spotlight be bigger than 1/4 of the window */ + if (radius > xgwa.width / 4) radius = xgwa.width / 4; + if (radius > xgwa.height / 4) radius = xgwa.height / 4; + /* do the dance */ gcv.function = GXcopy; gcv.subwindow_mode = IncludeInferiors;