Commit 470e0bd4 authored by Ulrich Sibiller's avatar Ulrich Sibiller Committed by Mike Gabriel

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.
parent a539aaa6
...@@ -138,6 +138,9 @@ extern void nxagentSetVersionProperty(WindowPtr pWin); ...@@ -138,6 +138,9 @@ extern void nxagentSetVersionProperty(WindowPtr pWin);
void nxagentClearSplash(WindowPtr pW) void nxagentClearSplash(WindowPtr pW)
{ {
if (!pW)
return;
ScreenPtr pScreen = pW->drawable.pScreen; ScreenPtr pScreen = pW->drawable.pScreen;
if (pW->backgroundState == BackgroundPixmap) if (pW->backgroundState == BackgroundPixmap)
......
...@@ -85,6 +85,12 @@ int nxagentShowSplashWindow(Window parentWindow) ...@@ -85,6 +85,12 @@ int nxagentShowSplashWindow(Window parentWindow)
XSetWindowAttributes attributes; XSetWindowAttributes attributes;
GC gc; GC gc;
/*
* Show splash window only when running as X2Go Agent
*/
if(!nxagentX2go)
return False;
#ifdef TEST #ifdef TEST
fprintf(stderr, "nxagentShowSplashWindow: Got called.\n"); fprintf(stderr, "nxagentShowSplashWindow: Got called.\n");
#endif #endif
...@@ -175,15 +181,6 @@ void nxagentPaintLogo(Window win, GC gc, int scale, int width, int height) ...@@ -175,15 +181,6 @@ void nxagentPaintLogo(Window win, GC gc, int scale, int width, int height)
XPoint rect[4]; XPoint rect[4];
int w, h, c, w2, h2; int w, h, c, w2, h2;
/*
* Show only X2GO Logo when running as X2Go Agent
*/
if(! nxagentX2go)
{
nxagentPixmapLogo = 0L;
return;
}
#ifdef DEBUG #ifdef DEBUG
fprintf(stderr, "nxagentPaintLogo: Got called.\n"); fprintf(stderr, "nxagentPaintLogo: Got called.\n");
#endif #endif
......
...@@ -669,6 +669,8 @@ Bool nxagentDestroyWindow(WindowPtr pWin) ...@@ -669,6 +669,8 @@ Bool nxagentDestroyWindow(WindowPtr pWin)
nxagentSplashCount); nxagentSplashCount);
#endif #endif
if (nxagentRootTileWindow)
{
if (nxagentSplashCount == 1) if (nxagentSplashCount == 1)
{ {
XClearWindow(nxagentDisplay, nxagentWindowPriv(nxagentRootTileWindow) -> window); XClearWindow(nxagentDisplay, nxagentWindowPriv(nxagentRootTileWindow) -> window);
...@@ -679,6 +681,7 @@ Bool nxagentDestroyWindow(WindowPtr pWin) ...@@ -679,6 +681,7 @@ Bool nxagentDestroyWindow(WindowPtr pWin)
nxagentWindowPriv(nxagentRootTileWindow)->window = None; nxagentWindowPriv(nxagentRootTileWindow)->window = None;
nxagentRootTileWindow = None; nxagentRootTileWindow = None;
} }
}
pWindowPriv->window = None; pWindowPriv->window = None;
......
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