Commit afebb821 authored by Ulrich Sibiller's avatar Ulrich Sibiller Committed by Mike Gabriel

Splash.c: remove global variables for colors

Make them defines. Also determine the screen depth dynamically.
parent 8fcaafab
...@@ -1386,15 +1386,6 @@ FIXME: Use of nxagentParentWindow is strongly deprecated. ...@@ -1386,15 +1386,6 @@ FIXME: Use of nxagentParentWindow is strongly deprecated.
nxagentChangeOption(BorderWidth, 1); nxagentChangeOption(BorderWidth, 1);
} }
nxagentLogoDepth = DefaultDepth(nxagentDisplay,
DefaultScreen(nxagentDisplay)
);
nxagentLogoBlack = 0x000000;
nxagentLogoRed = 0xff0000;
nxagentLogoWhite = 0xffffff;
nxagentLogoGray = 0x222222;
#ifdef WATCH #ifdef WATCH
fprintf(stderr, "nxagentOpenDisplay: Watchpoint 5.1.\n"); fprintf(stderr, "nxagentOpenDisplay: Watchpoint 5.1.\n");
...@@ -2860,13 +2851,6 @@ Bool nxagentReconnectDisplay(void *p0) ...@@ -2860,13 +2851,6 @@ Bool nxagentReconnectDisplay(void *p0)
nxagentConfineWindow); nxagentConfineWindow);
#endif #endif
nxagentLogoDepth = DefaultDepth(nxagentDisplay, DefaultScreen(nxagentDisplay));
nxagentLogoBlack = 0x000000;
nxagentLogoRed = 0xff0000;
nxagentLogoWhite = 0xffffff;
nxagentLogoGray = 0x222222;
useXpmIcon = nxagentMakeIcon(nxagentDisplay, &nxagentIconPixmap, &nxagentIconShape); useXpmIcon = nxagentMakeIcon(nxagentDisplay, &nxagentIconPixmap, &nxagentIconShape);
/* /*
......
...@@ -58,11 +58,10 @@ ...@@ -58,11 +58,10 @@
* Colors used to paint the splash screen. * Colors used to paint the splash screen.
*/ */
int nxagentLogoDepth; #define nxagentLogoWhite 0xffffff
int nxagentLogoWhite; #define nxagentLogoRed 0xff0000
int nxagentLogoRed; #define nxagentLogoBlack 0x000000
int nxagentLogoBlack; #define nxagentLogoGray 0x222222
int nxagentLogoGray;
static void nxagentPaintLogo(Window win, GC gc, int scale, int width, int height); static void nxagentPaintLogo(Window win, GC gc, int scale, int width, int height);
...@@ -176,6 +175,8 @@ void nxagentShowSplashWindow(Window parentWindow) ...@@ -176,6 +175,8 @@ void nxagentShowSplashWindow(Window parentWindow)
void nxagentPaintLogo(Window win, GC gc, int scale, int width, int height) void nxagentPaintLogo(Window win, GC gc, int scale, int width, int height)
{ {
int depth = DefaultDepth(nxagentDisplay, DefaultScreen(nxagentDisplay));
#ifdef DEBUG #ifdef DEBUG
fprintf(stderr, "%s: Got called.\n", __func__); fprintf(stderr, "%s: Got called.\n", __func__);
#endif #endif
...@@ -183,9 +184,8 @@ void nxagentPaintLogo(Window win, GC gc, int scale, int width, int height) ...@@ -183,9 +184,8 @@ void nxagentPaintLogo(Window win, GC gc, int scale, int width, int height)
#ifdef NXAGENT_LOGO_DEBUG #ifdef NXAGENT_LOGO_DEBUG
fprintf(stderr, "%s: begin\n", __func__); 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__, fprintf(stderr, "%s: gen params are: w=%d h=%d d=%d r=%x w=%x b=%x\n", __func__,
width, height, width, height, depth,
nxagentLogoDepth, nxagentLogoRed, nxagentLogoRed, nxagentLogoWhite, nxagentLogoBlack);
nxagentLogoWhite, nxagentLogoBlack);
#endif #endif
int w = width/scale; int w = width/scale;
......
...@@ -37,12 +37,6 @@ extern int XdmcpTimeOutRtx; ...@@ -37,12 +37,6 @@ extern int XdmcpTimeOutRtx;
extern int XdmcpStartTime; extern int XdmcpStartTime;
extern int nxagentXdmcpUp; extern int nxagentXdmcpUp;
extern int nxagentLogoDepth;
extern int nxagentLogoWhite;
extern int nxagentLogoRed;
extern int nxagentLogoBlack;
extern int nxagentLogoGray;
extern Window nxagentSplashWindow; extern Window nxagentSplashWindow;
extern int nxagentWMPassed; extern int nxagentWMPassed;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment