X-Git-Url: http://git.hungrycats.org/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=hacks%2Fscreenhack.c;h=4d169939018de416fe59c05513d15aaab4b5ea1c;hb=cf665b135b41d4f42067f9d9a8111c9602777cc1;hp=86789e4800a594caa72e63c0cd4dd1060f5ed7fc;hpb=c6b273ef7292ba10943694df1656b05203d7b62f;p=xscreensaver diff --git a/hacks/screenhack.c b/hacks/screenhack.c index 86789e48..4d169939 100644 --- a/hacks/screenhack.c +++ b/hacks/screenhack.c @@ -1,5 +1,5 @@ /* xscreensaver, Copyright (c) 1992, 1995, 1997, 1998 - * Jamie Zawinski + * Jamie Zawinski * * Permission to use, copy, modify, distribute, and sell this software and its * documentation for any purpose is hereby granted without fee, provided that @@ -71,7 +71,7 @@ static XrmOptionDescRec default_options [] = { }; static char *default_defaults[] = { - "*root: false", + ".root: false", "*geometry: 600x480", /* this should be .geometry, but nooooo... */ "*mono: false", "*installColormap: false", @@ -115,6 +115,23 @@ merge_options (void) def_defaults_size * sizeof(*defaults)); memcpy (merged_defaults + def_defaults_size, defaults, (defaults_size + 1) * sizeof(*defaults)); + + /* This totally sucks. Xt should behave like this by default. + If the string in `defaults' looks like ".foo", change that + to "Progclass.foo". + */ + { + char **s; + for (s = merged_defaults; *s; s++) + if (**s == '.') + { + const char *oldr = *s; + char *newr = (char *) malloc(strlen(oldr) + strlen(progclass) + 3); + strcpy (newr, progclass); + strcat (newr, oldr); + *s = newr; + } + } } @@ -209,7 +226,7 @@ main (int argc, char **argv) Bool help_p = !strcmp(argv[1], "-help"); fprintf (stderr, "%s\n", version); for (s = progclass; *s; s++) fprintf(stderr, " "); - fprintf (stderr, " http://people.netscape.com/jwz/xscreensaver/\n\n"); + fprintf (stderr, " http://www.jwz.org/xscreensaver/\n\n"); if (!help_p) fprintf(stderr, "Unrecognised option: %s\n", argv[1]);