[X2Go-Commits] [nx-libs] 171/219: Splash.c: remove global variables for colors
git-admin at x2go.org
git-admin at x2go.org
Sat Sep 28 12:10:49 CEST 2019
This is an automated email from the git hooks/post-receive script.
x2go pushed a commit to branch 3.6.x
in repository nx-libs.
commit afebb8211b6f6d47e8a17d21f64ec3ffc8ea82e3
Author: Ulrich Sibiller <uli42 at gmx.de>
Date: Thu Aug 15 22:10:45 2019 +0200
Splash.c: remove global variables for colors
Make them defines. Also determine the screen depth dynamically.
---
nx-X11/programs/Xserver/hw/nxagent/Display.c | 16 ----------------
nx-X11/programs/Xserver/hw/nxagent/Splash.c | 16 ++++++++--------
nx-X11/programs/Xserver/hw/nxagent/Splash.h | 6 ------
3 files changed, 8 insertions(+), 30 deletions(-)
diff --git a/nx-X11/programs/Xserver/hw/nxagent/Display.c b/nx-X11/programs/Xserver/hw/nxagent/Display.c
index 127874962..4bce82783 100644
--- a/nx-X11/programs/Xserver/hw/nxagent/Display.c
+++ b/nx-X11/programs/Xserver/hw/nxagent/Display.c
@@ -1386,15 +1386,6 @@ FIXME: Use of nxagentParentWindow is strongly deprecated.
nxagentChangeOption(BorderWidth, 1);
}
- nxagentLogoDepth = DefaultDepth(nxagentDisplay,
- DefaultScreen(nxagentDisplay)
- );
-
- nxagentLogoBlack = 0x000000;
- nxagentLogoRed = 0xff0000;
- nxagentLogoWhite = 0xffffff;
- nxagentLogoGray = 0x222222;
-
#ifdef WATCH
fprintf(stderr, "nxagentOpenDisplay: Watchpoint 5.1.\n");
@@ -2860,13 +2851,6 @@ Bool nxagentReconnectDisplay(void *p0)
nxagentConfineWindow);
#endif
- nxagentLogoDepth = DefaultDepth(nxagentDisplay, DefaultScreen(nxagentDisplay));
-
- nxagentLogoBlack = 0x000000;
- nxagentLogoRed = 0xff0000;
- nxagentLogoWhite = 0xffffff;
- nxagentLogoGray = 0x222222;
-
useXpmIcon = nxagentMakeIcon(nxagentDisplay, &nxagentIconPixmap, &nxagentIconShape);
/*
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;
diff --git a/nx-X11/programs/Xserver/hw/nxagent/Splash.h b/nx-X11/programs/Xserver/hw/nxagent/Splash.h
index 52adbc340..5f7547e57 100644
--- a/nx-X11/programs/Xserver/hw/nxagent/Splash.h
+++ b/nx-X11/programs/Xserver/hw/nxagent/Splash.h
@@ -37,12 +37,6 @@ extern int XdmcpTimeOutRtx;
extern int XdmcpStartTime;
extern int nxagentXdmcpUp;
-extern int nxagentLogoDepth;
-extern int nxagentLogoWhite;
-extern int nxagentLogoRed;
-extern int nxagentLogoBlack;
-extern int nxagentLogoGray;
-
extern Window nxagentSplashWindow;
extern int nxagentWMPassed;
--
Alioth's /home/x2go-admin/maintenancescripts/git/hooks/post-receive-email on /srv/git/code.x2go.org/nx-libs.git
More information about the x2go-commits
mailing list