diff options
author | Ulrich Sibiller <uli42@gmx.de> | 2020-01-19 09:53:48 +0100 |
---|---|---|
committer | Mike Gabriel <mike.gabriel@das-netzwerkteam.de> | 2020-05-07 12:55:04 +0200 |
commit | ae20e50c7318e8bf0d850c065847edecacbeb1ed (patch) | |
tree | e2766d76527dd2a60712141a8a7d69f1233e819c /nx-X11/programs | |
parent | 2e467efb20a3e22d7d9bb941be7375f10cb84f66 (diff) | |
download | nx-libs-ae20e50c7318e8bf0d850c065847edecacbeb1ed.tar.gz nx-libs-ae20e50c7318e8bf0d850c065847edecacbeb1ed.tar.bz2 nx-libs-ae20e50c7318e8bf0d850c065847edecacbeb1ed.zip |
Splash.c: reduce number of Xlib calls
Diffstat (limited to 'nx-X11/programs')
-rw-r--r-- | nx-X11/programs/Xserver/hw/nxagent/Splash.c | 34 |
1 files changed, 24 insertions, 10 deletions
diff --git a/nx-X11/programs/Xserver/hw/nxagent/Splash.c b/nx-X11/programs/Xserver/hw/nxagent/Splash.c index a34591d7a..f98e7082c 100644 --- a/nx-X11/programs/Xserver/hw/nxagent/Splash.c +++ b/nx-X11/programs/Xserver/hw/nxagent/Splash.c @@ -124,14 +124,21 @@ void nxagentShowSplashWindow(XlibWindow parentWindow) fprintf(stderr, "%s: Going to create new splash window.\n", __func__); #endif + XSetWindowAttributes attributes = { + .override_redirect = True, + .border_pixel = WhitePixel (nxagentDisplay, 0), + .background_pixel = BlackPixel (nxagentDisplay, 0) + }; + nxagentSplashWindow = - XCreateSimpleWindow(nxagentDisplay, - parentWindow, - getAttributes.x, getAttributes.y, - getAttributes.width, getAttributes.height, - 0, - WhitePixel (nxagentDisplay, 0), - BlackPixel (nxagentDisplay, 0)); + XCreateWindow(nxagentDisplay, + parentWindow, + getAttributes.x, getAttributes.y, + getAttributes.width, getAttributes.height, + 0, + CopyFromParent, CopyFromParent, CopyFromParent, + CWOverrideRedirect | CWBorderPixel | CWBackPixel, + &attributes); #ifdef TEST fprintf(stderr, "%s: Created new splash window with id [0x%lx].\n", __func__, @@ -139,11 +146,18 @@ void nxagentShowSplashWindow(XlibWindow parentWindow) #endif nxagentPaintLogo(nxagentSplashWindow, 1, getAttributes.width, getAttributes.height); - XMapRaised (nxagentDisplay, nxagentSplashWindow); + XMapRaised(nxagentDisplay, nxagentSplashWindow); +#if 0 + /* + * should not be required since XMapRaised takes care of that: + * "The XMapRaised function essentially is similar to XMapWindow in + * that it maps the window and all of its subwindows that have had + * map requests. However, it also raises the specified window to + * the top of the stack." + */ XWindowChanges values = {.stack_mode = Above}; XConfigureWindow(nxagentDisplay, nxagentSplashWindow, CWStackMode, &values); - XSetWindowAttributes attributes = {.override_redirect = True}; - XChangeWindowAttributes(nxagentDisplay, nxagentSplashWindow, CWOverrideRedirect, &attributes); +#endif #ifdef NXAGENT_TIMESTAMP { |