aboutsummaryrefslogtreecommitdiff
path: root/nx-X11/programs/Xserver/hw/nxagent/Splash.c
diff options
context:
space:
mode:
authorUlrich Sibiller <uli42@gmx.de>2019-08-15 22:10:45 +0200
committerMike Gabriel <mike.gabriel@das-netzwerkteam.de>2019-08-27 08:12:24 +0200
commitafebb8211b6f6d47e8a17d21f64ec3ffc8ea82e3 (patch)
tree946646e39795ba9b7b1cc933eb1b7a0be8135a18 /nx-X11/programs/Xserver/hw/nxagent/Splash.c
parent8fcaafab426686f1e67d4535b391534d210f482c (diff)
downloadnx-libs-afebb8211b6f6d47e8a17d21f64ec3ffc8ea82e3.tar.gz
nx-libs-afebb8211b6f6d47e8a17d21f64ec3ffc8ea82e3.tar.bz2
nx-libs-afebb8211b6f6d47e8a17d21f64ec3ffc8ea82e3.zip
Splash.c: remove global variables for colors
Make them defines. Also determine the screen depth dynamically.
Diffstat (limited to 'nx-X11/programs/Xserver/hw/nxagent/Splash.c')
-rw-r--r--nx-X11/programs/Xserver/hw/nxagent/Splash.c16
1 files changed, 8 insertions, 8 deletions
diff --git a/nx-X11/programs/Xserver/hw/nxagent/Splash.c b/nx-X11/programs/Xserver/hw/nxagent/Splash.c
index 74322648a..91f599cc6 100644
--- a/nx-X11/programs/Xserver/hw/nxagent/Splash.c
+++ b/nx-X11/programs/Xserver/hw/nxagent/Splash.c
@@ -58,11 +58,10 @@
* Colors used to paint the splash screen.
*/
-int nxagentLogoDepth;
-int nxagentLogoWhite;
-int nxagentLogoRed;
-int nxagentLogoBlack;
-int nxagentLogoGray;
+#define nxagentLogoWhite 0xffffff
+#define nxagentLogoRed 0xff0000
+#define nxagentLogoBlack 0x000000
+#define nxagentLogoGray 0x222222
static void nxagentPaintLogo(Window win, GC gc, int scale, int width, int height);
@@ -176,6 +175,8 @@ void nxagentShowSplashWindow(Window parentWindow)
void nxagentPaintLogo(Window win, GC gc, int scale, int width, int height)
{
+ int depth = DefaultDepth(nxagentDisplay, DefaultScreen(nxagentDisplay));
+
#ifdef DEBUG
fprintf(stderr, "%s: Got called.\n", __func__);
#endif
@@ -183,9 +184,8 @@ void nxagentPaintLogo(Window win, GC gc, int scale, int width, int height)
#ifdef NXAGENT_LOGO_DEBUG
fprintf(stderr, "%s: begin\n", __func__);
fprintf(stderr, "%s: gen params are: w=%d h=%d d=%d r=%x w=%x b=%x\n", __func__,
- width, height,
- nxagentLogoDepth, nxagentLogoRed,
- nxagentLogoWhite, nxagentLogoBlack);
+ width, height, depth,
+ nxagentLogoRed, nxagentLogoWhite, nxagentLogoBlack);
#endif
int w = width/scale;