state->max_radius = get_float_resource (dpy, "size", "Size") / 2;
if (state->max_radius < 1.0) state->max_radius = 1.0;
+ if (state->xgwa.width > 2560) state->max_radius *= 2; /* Retina displays */
+
+ if (state->xgwa.width < 100 || state->xgwa.height < 100) /* tiny window */
+ {
+ if (state->max_radius > 5)
+ state->max_radius = 5;
+ }
+
state->random_sizes_p = get_boolean_resource (dpy, "random", "Random");
/* If the initial window size is too small to hold all these balls,
XFontStruct *font;
char *fontname = get_string_resource (dpy, "fpsFont", "Font");
if (!fontname) fontname = "-*-courier-bold-r-normal-*-180-*";
- font = XLoadQueryFont (dpy, fontname);
- if (!font) font = XLoadQueryFont (dpy, "fixed");
- if (!font) exit(-1);
+ font = load_font_retry (dpy, fontname);
+ if (!font) abort();
gcv.font = font->fid;
gcv.foreground = get_pixel_resource(state->dpy, state->xgwa.colormap,
"textColor", "Foreground");