/*
* Copyright (c) 2009, 2010, Oracle and/or its affiliates. All rights reserved.
*
* Permission is hereby granted, free of charge, to any person obtaining a
* copy of this software and associated documentation files (the
* "Software"), to deal in the Software without restriction, including
* without limitation the rights to use, copy, modify, merge, publish,
* distribute, and/or sell copies of the Software, and to permit persons
* to whom the Software is furnished to do so, provided that the above
* copyright notice(s) and this permission notice appear in all copies of
* the Software and that both the above copyright notice(s) and this
* permission notice appear in supporting documentation.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
* OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT
* OF THIRD PARTY RIGHTS. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR
* HOLDERS INCLUDED IN THIS NOTICE BE LIABLE FOR ANY CLAIM, OR ANY SPECIAL
* INDIRECT OR CONSEQUENTIAL DAMAGES, OR ANY DAMAGES WHATSOEVER RESULTING
* FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT,
* NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION
* WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*
* Except as contained in this notice, the name of a copyright holder
* shall not be used in advertising or otherwise to promote the sale, use
* or other dealings in this Software without prior written authorization
* of the copyright holder.
*
*/
Use Sun/Solaris branding colors in various hacks to better match color schemes
of the rest of the desktop.
diff -Nurp -x '*~' -x '*.orig' xscreensaver-5.01/driver/XScreenSaver.ad.in xscreensaver-5.01/driver/XScreenSaver.ad.in
--- xscreensaver-5.01/driver/XScreenSaver.ad.in 2009-05-27 17:20:45.431525000 -0700
+++ xscreensaver-5.01/driver/XScreenSaver.ad.in 2009-05-27 17:21:04.048036000 -0700
@@ -309,7 +309,7 @@ GetViewPortIsFullOfLies: False
anemotaxis -root \n\
@GL_KLUDGE@ GL: antinspect -root \n\
fireworkx -root \n\
- fuzzyflakes -root \n\
+ fuzzyflakes -root -color A3B8CB \n\
interaggregate -root \n\
intermomentary -root \n\
memscroller -root \n\
diff -Nurp -x '*~' -x '*.orig' xscreensaver-5.01/hacks/glx/antinspect.c xscreensaver-5.01/hacks/glx/antinspect.c
--- xscreensaver-5.01/hacks/glx/antinspect.c 2006-02-25 12:13:26.000000000 -0800
+++ xscreensaver-5.01/hacks/glx/antinspect.c 2009-05-27 17:21:04.048572000 -0700
@@ -94,13 +94,13 @@ static const float position1[] = {-1.0,
static const float lmodel_ambient[] = {0.5, 0.5, 0.5, 1.0};
static const float lmodel_twoside[] = {GL_TRUE};
-static const float MaterialRed[] = {0.6, 0.0, 0.0, 1.0};
-static const float MaterialOrange[] = {1.0, 0.69, 0.00, 1.0};
-static const float MaterialGray[] = {0.2, 0.2, 0.2, 1.0};
+static const float MaterialRed[] = {0.90, 0.43, 0.0, 1.0};
+static const float MaterialOrange[] = {1.0, 0.78, 0.15, 1.0};
+static const float MaterialGray[] = {0.2, 0.21, 0.22, 1.0};
static const float MaterialBlack[] = {0.1, 0.1, 0.1, 0.4};
static const float MaterialShadow[] = {0.3, 0.3, 0.3, 0.3};
-static const float MaterialGray5[] = {0.5, 0.5, 0.5, 0.3};
-static const float MaterialGray6[] = {0.6, 0.6, 0.6, 1.0};
+static const float MaterialGray5[] = {0.5, 0.51, 0.53, 0.3};
+static const float MaterialGray6[] = {0.6, 0.61, 0.63, 1.0};
static antinspectstruct *antinspect = (antinspectstruct *) NULL;
diff -Nurp -x '*~' -x '*.orig' xscreensaver-5.01/hacks/glx/antmaze.c xscreensaver-5.01/hacks/glx/antmaze.c
--- xscreensaver-5.01/hacks/glx/antmaze.c 2006-03-14 19:55:05.000000000 -0800
+++ xscreensaver-5.01/hacks/glx/antmaze.c 2009-05-27 17:21:04.049372000 -0700
@@ -148,13 +148,13 @@ typedef struct {
static antmazestruct *antmaze = (antmazestruct *) NULL;
-static const GLfloat MaterialRed[] = {0.6, 0.0, 0.0, 1.0};
+static const GLfloat MaterialRed[] = {0.75, 0.40, 0.0, 1.0};
/*static const GLfloat MaterialMagenta[] = {0.6, 0.2, 0.5, 1.0};*/
static const GLfloat MaterialGray8[] = {0.8, 0.8, 0.8, 1.0};
-static const GLfloat MaterialGray35[] = {0.30, 0.30, 0.30, 1.0};
-static const GLfloat MaterialGray4[] = {0.40, 0.40, 0.40, 1.0};
-static const GLfloat MaterialOrange[] = {1.0, 0.69, 0.00, 1.0};
-static const GLfloat MaterialGreen[] = {0.1, 0.4, 0.2, 1.0};
+static const GLfloat MaterialGray35[] = {0.30, 0.31, 0.33, 1.0};
+static const GLfloat MaterialGray4[] = {0.4375, 0.4450, 0.4650, 1.0};
+static const GLfloat MaterialOrange[] = {0.90, 0.43, 0.00, 1.0};
+static const GLfloat MaterialGreen[] = {0.695, 0.734, 0.0, 1.0};
/* lighting variables */
static const GLfloat front_shininess[] = {60.0};
diff -Nurp -x '*~' -x '*.orig' xscreensaver-5.01/hacks/glx/flipflop.c xscreensaver-5.01/hacks/glx/flipflop.c
--- xscreensaver-5.01/hacks/glx/flipflop.c Thu Sep 14 01:58:04 2006
+++ xscreensaver-5.01/hacks/glx/flipflop.c Thu Jun 4 21:11:39 2009
@@ -602,6 +602,13 @@ randsheet_free( randsheet *rs )
free(rs->tex);
}
+
+static const float brand_colors[3][3] = {
+ {0.9023, 0.4336, 0.0000},
+ {0.6953, 0.7344, 0.0000},
+ {0.3242, 0.5078, 0.6289}
+};
+
static void
randsheet_initialize( randsheet *rs )
{
@@ -619,9 +626,13 @@ randsheet_initialize( randsheet *rs )
rs->xpos[ index ] = i;
rs->ypos[ index ] = j;
/* have the square colors start out as a pattern */
- rs->color[ index*3 + 0 ] = ((i+j)%3 == 0)||((i+j+1)%3 == 0);
- rs->color[ index*3 + 1 ] = ((i+j+1)%3 == 0);
- rs->color[ index*3 + 2 ] = ((i+j+2)%3 == 0);
+ rs->color[ index*3 + 0 ]
+ = brand_colors[ (i+j) % 3 ][0];
+ rs->color[ index*3 + 1 ]
+ = brand_colors[ (i+j) % 3 ][1];
+ rs->color[ index*3 + 2 ]
+ = brand_colors[ (i+j) % 3 ][2];
+
index++;
}
/* leave everything else empty*/
diff -Nurp -x '*~' -x '*.orig' xscreensaver-5.01/hacks/glx/sproingies.c xscreensaver-5.01/hacks/glx/sproingies.c
--- xscreensaver-5.01/hacks/glx/sproingies.c 2006-09-18 14:45:17.000000000 -0700
+++ xscreensaver-5.01/hacks/glx/sproingies.c 2009-05-27 17:21:04.050613000 -0700
@@ -113,9 +113,9 @@ build_TopsSides(int wireframe)
/* Surface: Tops */
glNewList(dl_num, GL_COMPILE);
- mat_color[0] = 0.392157;
- mat_color[1] = 0.784314;
- mat_color[2] = 0.941176;
+ mat_color[0] = 0.325490;
+ mat_color[1] = 0.509804;
+ mat_color[2] = 0.631373;
if (wireframe)
glColor3fv(mat_color);
else {
@@ -129,9 +129,9 @@ build_TopsSides(int wireframe)
glColor3fv(mat_color);
else {
/* jwz: in wireframe mode, color tops and sides the same. */
- mat_color[0] = 0.156863;
- mat_color[1] = 0.156863;
- mat_color[2] = 0.392157;
+ mat_color[0] = 0.207843;
+ mat_color[1] = 0.333333;
+ mat_color[2] = 0.419607;
glMaterialfv(GL_FRONT, GL_AMBIENT_AND_DIFFUSE, mat_color);
}
glEndList();
diff -Nurp -x '*~' -x '*.orig' xscreensaver-5.01/utils/colors.c xscreensaver-5.01/utils/colors.c
--- xscreensaver-5.01/utils/colors.c 2006-02-04 05:39:41.000000000 -0800
+++ xscreensaver-5.01/utils/colors.c 2009-05-27 17:21:04.051139000 -0700
@@ -598,6 +598,13 @@ make_uniform_colormap (Display *dpy, Vis
*ncolorsP = ncolors;
}
+/* Use branding colors first in random colormaps */
+#define NUM_BRANDING_COLORS 12
+static const XColor branding_colors[NUM_BRANDING_COLORS] = {
+ { 83, 130, 161}, {231, 111, 0}, {178, 188, 0}, {255, 199, 38},
+ { 53, 85, 107}, {192, 102, 0}, {127, 120, 0}, {198, 146, 0},
+ {163, 184, 203}, {237, 155, 79}, {197, 213, 169}, {248, 213, 131}
+};
void
make_random_colormap (Display *dpy, Visual *visual, Colormap cmap,
@@ -610,6 +617,7 @@ make_random_colormap (Display *dpy, Visu
Bool wanted_writable = (allocate_p && writable_pP && *writable_pP);
int ncolors = *ncolorsP;
int i;
+ int branding_color_offset = random() % NUM_BRANDING_COLORS;
Screen *screen = (dpy ? DefaultScreenOfDisplay(dpy) : 0); /* #### WRONG! */
if (*ncolorsP <= 0) return;
@@ -631,9 +639,16 @@ make_random_colormap (Display *dpy, Visu
}
else
{
+ if (i < NUM_BRANDING_COLORS) {
+ int n = (i + branding_color_offset) % NUM_BRANDING_COLORS;
+ colors[i].red = branding_colors[n].red;
+ colors[i].green = branding_colors[n].green;
+ colors[i].blue = branding_colors[n].blue;
+ } else {
colors[i].red = random() % 0xFFFF;
colors[i].green = random() % 0xFFFF;
colors[i].blue = random() % 0xFFFF;
+ }
}
}