[X2Go-Commits] [nx-libs] 188/219: Splash.c: do not wait in nxagent mode
git-admin at x2go.org
git-admin at x2go.org
Sat Sep 28 12:10:56 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 9cd602b271cc846d654f7f5d9a455368e9ca2612
Author: Ulrich Sibiller <uli42 at gmx.de>
Date: Sun Aug 11 01:47:16 2019 +0200
Splash.c: do not wait in nxagent mode
The splash window is only shown in x2go mode. In nxagent mode the
splash window was also shown, but empty (and thus invisible). And the
code waited for the splash window to disappear. Fix this by skipping
_all_ the splash stuff in nxagent mode.
---
nx-X11/programs/Xserver/hw/nxagent/NXwindow.c | 5 ++++-
nx-X11/programs/Xserver/hw/nxagent/Splash.c | 15 ++++++---------
nx-X11/programs/Xserver/hw/nxagent/Window.c | 17 ++++++++++-------
3 files changed, 20 insertions(+), 17 deletions(-)
diff --git a/nx-X11/programs/Xserver/hw/nxagent/NXwindow.c b/nx-X11/programs/Xserver/hw/nxagent/NXwindow.c
index f67295c43..3cd8d0ce9 100644
--- a/nx-X11/programs/Xserver/hw/nxagent/NXwindow.c
+++ b/nx-X11/programs/Xserver/hw/nxagent/NXwindow.c
@@ -138,11 +138,14 @@ extern void nxagentSetVersionProperty(WindowPtr pWin);
void nxagentClearSplash(WindowPtr pW)
{
+ if (!pW)
+ return;
+
ScreenPtr pScreen = pW->drawable.pScreen;
if (pW->backgroundState == BackgroundPixmap)
{
- (*pScreen->DestroyPixmap)(pW->background.pixmap);
+ (*pScreen->DestroyPixmap)(pW->background.pixmap);
}
pW->backgroundState = BackgroundPixel;
diff --git a/nx-X11/programs/Xserver/hw/nxagent/Splash.c b/nx-X11/programs/Xserver/hw/nxagent/Splash.c
index bc86fed36..e2e88674b 100644
--- a/nx-X11/programs/Xserver/hw/nxagent/Splash.c
+++ b/nx-X11/programs/Xserver/hw/nxagent/Splash.c
@@ -85,6 +85,12 @@ int nxagentShowSplashWindow(Window parentWindow)
XSetWindowAttributes attributes;
GC gc;
+ /*
+ * Show splash window only when running as X2Go Agent
+ */
+ if(!nxagentX2go)
+ return False;
+
#ifdef TEST
fprintf(stderr, "nxagentShowSplashWindow: Got called.\n");
#endif
@@ -175,15 +181,6 @@ void nxagentPaintLogo(Window win, GC gc, int scale, int width, int height)
XPoint rect[4];
int w, h, c, w2, h2;
- /*
- * Show only X2GO Logo when running as X2Go Agent
- */
- if(! nxagentX2go)
- {
- nxagentPixmapLogo = 0L;
- return;
- }
-
#ifdef DEBUG
fprintf(stderr, "nxagentPaintLogo: Got called.\n");
#endif
diff --git a/nx-X11/programs/Xserver/hw/nxagent/Window.c b/nx-X11/programs/Xserver/hw/nxagent/Window.c
index fc59973bd..86ae1d607 100644
--- a/nx-X11/programs/Xserver/hw/nxagent/Window.c
+++ b/nx-X11/programs/Xserver/hw/nxagent/Window.c
@@ -670,15 +670,18 @@ Bool nxagentDestroyWindow(WindowPtr pWin)
nxagentSplashCount);
#endif
- if (nxagentSplashCount == 1)
+ if (nxagentRootTileWindow)
{
- XClearWindow(nxagentDisplay, nxagentWindowPriv(nxagentRootTileWindow) -> window);
- }
+ if (nxagentSplashCount == 1)
+ {
+ XClearWindow(nxagentDisplay, nxagentWindowPriv(nxagentRootTileWindow) -> window);
+ }
- if (pWin == nxagentRootTileWindow)
- {
- nxagentWindowPriv(nxagentRootTileWindow)->window = None;
- nxagentRootTileWindow = None;
+ if (pWin == nxagentRootTileWindow)
+ {
+ nxagentWindowPriv(nxagentRootTileWindow)->window = None;
+ nxagentRootTileWindow = None;
+ }
}
pWindowPriv->window = None;
--
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