X-Git-Url: http://git.hungrycats.org/cgi-bin/gitweb.cgi?p=xscreensaver;a=blobdiff_plain;f=hacks%2Fcompass.c;h=415e7c0a499d2e69a6075386d9651d3ecc4a94d9;hp=5b9ba4990ec51febf325ae04183ec366d5bc14cf;hb=6f5482d73adb0165c0130bb47d852644ab0c4869;hpb=c70f94f648d51bb4828193124f325fa52b0e57f3 diff --git a/hacks/compass.c b/hacks/compass.c index 5b9ba499..415e7c0a 100644 --- a/hacks/compass.c +++ b/hacks/compass.c @@ -933,6 +933,11 @@ static void compass_reshape (Display *dpy, Window window, void *closure, unsigned int w, unsigned int h) { + struct state *st = (struct state *) closure; + XGetWindowAttributes (st->dpy, st->window, &st->xgwa); + st->size2 = MIN(st->xgwa.width, st->xgwa.height); + st->x = st->xgwa.width/2; + st->y = st->xgwa.height/2; } static Bool