+static void
+reshape (sonar_info *si)
+{
+ XWindowAttributes xgwa;
+ Pixmap mask;
+ XGetWindowAttributes(si->dpy, si->win, &xgwa);
+ si->width = xgwa.width;
+ si->height = xgwa.height;
+ si->centrex = si->width / 2;
+ si->centrey = si->height / 2;
+ si->maxx = si->centrex + MY_MIN(si->centrex, si->centrey) - 10;
+ si->minx = si->centrex - MY_MIN(si->centrex, si->centrey) + 10;
+ si->maxy = si->centrey + MY_MIN(si->centrex, si->centrey) - 10;
+ si->miny = si->centrey - MY_MIN(si->centrex, si->centrey) + 10;
+ si->radius = si->maxx - si->centrex;
+
+ /* Install the clip mask... */
+ mask = scope_mask (si->dpy, si->win, si);
+ XSetClipMask(si->dpy, si->text, mask);
+ XSetClipMask(si->dpy, si->erase, mask);
+ XFreePixmap (si->dpy, mask); /* it's been copied into the GCs */
+}
+