-/* xscreensaver, Copyright (c) 1992 Jamie Zawinski <jwz@lucid.com>
+/* xscreensaver, Copyright (c) 1992, 1995 Jamie Zawinski <jwz@netscape.com>
*
* Permission to use, copy, modify, distribute, and sell this software and its
* documentation for any purpose is hereby granted without fee, provided that
if (!XAllocColor (dpy, cmap, &qix->lines[0].color))
{
qix->lines[0].color.pixel = default_fg_pixel;
- if (!XQueryColor (dpy, cmap, &qix->lines[0].color))
- abort ();
+ XQueryColor (dpy, cmap, &qix->lines[0].color);
if (!XAllocColor (dpy, cmap, &qix->lines[0].color))
abort ();
}
if (!mono_p && !transparent_p)
{
+ XColor desired;
cycle_hue (&qline->color, color_shift);
qline->color.flags = DoRed | DoGreen | DoBlue;
- if (!XAllocColor (dpy, cmap, &qline->color))
+ desired = qline->color;
+ if (XAllocColor (dpy, cmap, &qline->color))
+ {
+ /* XAllocColor returns the actual RGB that the hardware let us
+ allocate. Restore the requested values into the XColor struct
+ so that limited-resolution hardware doesn't cause cycle_hue to
+ get "stuck". */
+ qline->color.red = desired.red;
+ qline->color.green = desired.green;
+ qline->color.blue = desired.blue;
+ }
+ else
{
qline->color = prev_qline->color;
if (!XAllocColor (dpy, cmap, &qline->color))
char *progclass = "Qix";
char *defaults [] = {
- "*background: black",
- "*foreground: white",
+ "Qix.background: black", /* to placate SGI */
+ "Qix.foreground: white",
"*count: 1",
"*segments: 50",
"*spread: 8",