aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorUlrich Sibiller <uli42@gmx.de>2020-01-19 09:25:32 +0100
committerMike Gabriel <mike.gabriel@das-netzwerkteam.de>2020-05-07 12:55:04 +0200
commitde46c64ec1036a91014f6b0384d9f5038cd30cc6 (patch)
tree7de1f0cd8d3ea34deadf730b1ec42e88ac4d47e9
parent26ea6d33fb41f29254935cf9a7646492e920ed94 (diff)
downloadnx-libs-de46c64ec1036a91014f6b0384d9f5038cd30cc6.tar.gz
nx-libs-de46c64ec1036a91014f6b0384d9f5038cd30cc6.tar.bz2
nx-libs-de46c64ec1036a91014f6b0384d9f5038cd30cc6.zip
Splash.c: move the GC to nxagentPaintLogo
It is not needed elsewhere.
-rw-r--r--nx-X11/programs/Xserver/hw/nxagent/Splash.c12
1 files changed, 7 insertions, 5 deletions
diff --git a/nx-X11/programs/Xserver/hw/nxagent/Splash.c b/nx-X11/programs/Xserver/hw/nxagent/Splash.c
index 1bb39910b..f4c25efc4 100644
--- a/nx-X11/programs/Xserver/hw/nxagent/Splash.c
+++ b/nx-X11/programs/Xserver/hw/nxagent/Splash.c
@@ -61,7 +61,7 @@ static XlibPixmap nxagentPixmapLogo;
static XlibWindow nxagentSplashWindow = None;
static Bool nxagentWMPassed = False;
-static void nxagentPaintLogo(XlibWindow win, XlibGC gc, int scale, int width, int height);
+static void nxagentPaintLogo(XlibWindow win, int scale, int width, int height);
void nxagentShowSplashWindow(XlibWindow parentWindow)
{
@@ -138,14 +138,12 @@ void nxagentShowSplashWindow(XlibWindow parentWindow)
nxagentSplashWindow);
#endif
- XlibGC gc = XCreateGC(nxagentDisplay, nxagentSplashWindow, 0, NULL);
- nxagentPaintLogo(nxagentSplashWindow, gc, 1, getAttributes.width, getAttributes.height);
+ nxagentPaintLogo(nxagentSplashWindow, 1, getAttributes.width, getAttributes.height);
XMapRaised (nxagentDisplay, nxagentSplashWindow);
XWindowChanges values = {.stack_mode = Above};
XConfigureWindow(nxagentDisplay, nxagentSplashWindow, CWStackMode, &values);
XSetWindowAttributes attributes = {.override_redirect = True};
XChangeWindowAttributes(nxagentDisplay, nxagentSplashWindow, CWOverrideRedirect, &attributes);
- XFreeGC(nxagentDisplay, gc);
#ifdef NXAGENT_TIMESTAMP
{
@@ -161,8 +159,10 @@ Bool nxagentHaveSplashWindow(void)
return (nxagentSplashWindow != None);
}
-void nxagentPaintLogo(XlibWindow win, XlibGC gc, int scale, int width, int height)
+void nxagentPaintLogo(XlibWindow win, int scale, int width, int height)
{
+ XlibGC gc = XCreateGC(nxagentDisplay, nxagentSplashWindow, 0, NULL);
+
int depth = DefaultDepth(nxagentDisplay, DefaultScreen(nxagentDisplay));
#ifdef DEBUG
@@ -396,6 +396,8 @@ void nxagentPaintLogo(XlibWindow win, XlibGC gc, int scale, int width, int heigh
XSetWindowBackgroundPixmap(nxagentDisplay, win, nxagentPixmapLogo);
+ XFreeGC(nxagentDisplay, gc);
+
#ifdef NXAGENT_LOGO_DEBUG
fprintf(stderr, "%s: end\n", __func__);
#endif