projects
/
xscreensaver
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
From http://www.jwz.org/xscreensaver/xscreensaver-5.39.tar.gz
[xscreensaver]
/
hacks
/
fluidballs.c
diff --git
a/hacks/fluidballs.c
b/hacks/fluidballs.c
index 3e39af090763e55e2f7e1a1c0327de52498301d6..92730825c79cd172d4475b178630cfd06835bf57 100644
(file)
--- a/
hacks/fluidballs.c
+++ b/
hacks/fluidballs.c
@@
-296,6
+296,8
@@
fluidballs_init (Display *dpy, Window window)
state->max_radius = get_float_resource (dpy, "size", "Size") / 2;
if (state->max_radius < 1.0) state->max_radius = 1.0;
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)
if (state->xgwa.width < 100 || state->xgwa.height < 100) /* tiny window */
{
if (state->max_radius > 5)
@@
-347,9
+349,8
@@
fluidballs_init (Display *dpy, Window window)
XFontStruct *font;
char *fontname = get_string_resource (dpy, "fpsFont", "Font");
if (!fontname) fontname = "-*-courier-bold-r-normal-*-180-*";
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");
gcv.font = font->fid;
gcv.foreground = get_pixel_resource(state->dpy, state->xgwa.colormap,
"textColor", "Foreground");