Unverified Commit 8b15d574 authored by Mike Gabriel's avatar Mike Gabriel

Merge branch 'uli42-pr/fix_background' into 3.6.x

parents f24767b3 3563959c
...@@ -305,7 +305,6 @@ SetWindowToDefaults(register WindowPtr pWin) ...@@ -305,7 +305,6 @@ SetWindowToDefaults(register WindowPtr pWin)
#endif #endif
} }
#ifndef NXAGENT_SERVER
static void static void
MakeRootTile(WindowPtr pWin) MakeRootTile(WindowPtr pWin)
{ {
...@@ -348,7 +347,6 @@ MakeRootTile(WindowPtr pWin) ...@@ -348,7 +347,6 @@ MakeRootTile(WindowPtr pWin)
FreeScratchGC(pGC); FreeScratchGC(pGC);
} }
#endif /* NXAGENT_SERVER */
WindowPtr WindowPtr
AllocateWindow(ScreenPtr pScreen) AllocateWindow(ScreenPtr pScreen)
......
...@@ -1386,15 +1386,6 @@ FIXME: Use of nxagentParentWindow is strongly deprecated. ...@@ -1386,15 +1386,6 @@ FIXME: Use of nxagentParentWindow is strongly deprecated.
nxagentChangeOption(BorderWidth, 1); nxagentChangeOption(BorderWidth, 1);
} }
nxagentLogoDepth = DefaultDepth(nxagentDisplay,
DefaultScreen(nxagentDisplay)
);
nxagentLogoBlack = 0x000000;
nxagentLogoRed = 0xff0000;
nxagentLogoWhite = 0xffffff;
nxagentLogoGray = 0x222222;
#ifdef WATCH #ifdef WATCH
fprintf(stderr, "nxagentOpenDisplay: Watchpoint 5.1.\n"); fprintf(stderr, "nxagentOpenDisplay: Watchpoint 5.1.\n");
...@@ -2860,13 +2851,6 @@ Bool nxagentReconnectDisplay(void *p0) ...@@ -2860,13 +2851,6 @@ Bool nxagentReconnectDisplay(void *p0)
nxagentConfineWindow); nxagentConfineWindow);
#endif #endif
nxagentLogoDepth = DefaultDepth(nxagentDisplay, DefaultScreen(nxagentDisplay));
nxagentLogoBlack = 0x000000;
nxagentLogoRed = 0xff0000;
nxagentLogoWhite = 0xffffff;
nxagentLogoGray = 0x222222;
useXpmIcon = nxagentMakeIcon(nxagentDisplay, &nxagentIconPixmap, &nxagentIconShape); useXpmIcon = nxagentMakeIcon(nxagentDisplay, &nxagentIconPixmap, &nxagentIconShape);
/* /*
......
...@@ -124,7 +124,6 @@ ...@@ -124,7 +124,6 @@
extern Bool nxagentOnce; extern Bool nxagentOnce;
extern WindowPtr nxagentRootTileWindow; extern WindowPtr nxagentRootTileWindow;
extern int nxagentSplashCount;
extern int nxagentLastClipboardClient; extern int nxagentLastClipboardClient;
...@@ -2453,20 +2452,6 @@ FIXME: This can be maybe optimized by consuming the ...@@ -2453,20 +2452,6 @@ FIXME: This can be maybe optimized by consuming the
} }
} }
if (nxagentRootTileWindow != NULL)
{
if (nxagentWindowPriv(nxagentRootTileWindow) -> window == nxagentWindowPriv(pWin) -> window &&
nxagentSplashCount == 1 && X -> xexpose.count == 0)
{
#ifdef DEBUG
fprintf(stderr, "nxagentHandleExposeEvent: Clearing root tile window id [%u].\n",
nxagentWindowPriv(nxagentRootTileWindow) -> window);
#endif
XClearWindow(nxagentDisplay, nxagentWindowPriv(nxagentRootTileWindow) -> window);
}
}
RegionUninit(&sum); RegionUninit(&sum);
} }
......
...@@ -240,7 +240,6 @@ DEFINES = \ ...@@ -240,7 +240,6 @@ DEFINES = \
-DNXAGENT_VISIBILITY \ -DNXAGENT_VISIBILITY \
-DNXAGENT_WAKEUP=1000 \ -DNXAGENT_WAKEUP=1000 \
-DNXAGENT_ONSTART \ -DNXAGENT_ONSTART \
-DNXAGENT_SPLASH \
-DNXAGENT_ARTSD \ -DNXAGENT_ARTSD \
-DNXAGENT_RANDR_MODE_PREFIX \ -DNXAGENT_RANDR_MODE_PREFIX \
-UNX_DEBUG_INPUT \ -UNX_DEBUG_INPUT \
......
...@@ -413,7 +413,8 @@ FIXME: These variables, if not removed at all because have probably ...@@ -413,7 +413,8 @@ FIXME: These variables, if not removed at all because have probably
* background. * background.
*/ */
blackRoot = TRUE; if (!whiteRoot)
blackRoot = TRUE;
nxagentInitKeystrokes(False); nxagentInitKeystrokes(False);
......
...@@ -141,9 +141,6 @@ void nxagentWaitDisplay(void); ...@@ -141,9 +141,6 @@ void nxagentWaitDisplay(void);
void nxagentListRemoteFonts(const char *, int); void nxagentListRemoteFonts(const char *, int);
unsigned int nxagentWMtimeout = 0;
Bool nxagentWMPassed = False;
/* /*
* Timeouts based on screen saver time. * Timeouts based on screen saver time.
*/ */
...@@ -243,8 +240,6 @@ Dispatch(void) ...@@ -243,8 +240,6 @@ Dispatch(void)
register HWEventQueuePtr* icheck = checkForInput; register HWEventQueuePtr* icheck = checkForInput;
long start_tick; long start_tick;
unsigned long currentDispatch = 0;
nextFreeClientID = 1; nextFreeClientID = 1;
InitSelections(); InitSelections();
nClients = 0; nClients = 0;
...@@ -265,12 +260,11 @@ Dispatch(void) ...@@ -265,12 +260,11 @@ Dispatch(void)
#ifdef NXAGENT_ONSTART #ifdef NXAGENT_ONSTART
/* /*
* Set NX_WM property (used by NX client to identify * Set NX_WM property (used by NX client to identify the agent's
* the agent's window) three seconds since the first * window) three seconds since the first client connects.
* client connects.
*/ */
nxagentWMtimeout = GetTimeInMillis() + 3000; unsigned int nxagentWMtimeout = GetTimeInMillis() + 3000;
#endif #endif
...@@ -370,18 +364,15 @@ Reply Total Cached Bits In Bits Out Bits/Reply Ratio ...@@ -370,18 +364,15 @@ Reply Total Cached Bits In Bits Out Bits/Reply Ratio
#ifdef NXAGENT_ONSTART #ifdef NXAGENT_ONSTART
currentDispatch = GetTimeInMillis(); /*
* If the timeout is expired set the selection informing the
/* * NX client that the agent is ready.
* If the timeout is expired set the */
* selection informing the NX client
* that the agent is ready.
*/
if (!nxagentWMPassed && (nxagentWMtimeout < currentDispatch)) if (nxagentWMtimeout < GetTimeInMillis())
{ {
nxagentRemoveSplashWindow(NULL); nxagentRemoveSplashWindow();
} }
nxagentClients = nClients; nxagentClients = nClients;
...@@ -588,10 +579,7 @@ ProcReparentWindow(register ClientPtr client) ...@@ -588,10 +579,7 @@ ProcReparentWindow(register ClientPtr client)
if (!pWin) if (!pWin)
return(BadWindow); return(BadWindow);
if (!nxagentWMPassed) nxagentRemoveSplashWindow();
{
nxagentRemoveSplashWindow(pWin);
}
pParent = (WindowPtr)SecurityLookupWindow(stuff->parent, client, pParent = (WindowPtr)SecurityLookupWindow(stuff->parent, client,
DixWriteAccess); DixWriteAccess);
......
...@@ -114,10 +114,6 @@ Equipment Corporation. ...@@ -114,10 +114,6 @@ Equipment Corporation.
#include "Drawable.h" #include "Drawable.h"
#include "Colormap.h" #include "Colormap.h"
/* prototypes (only MakeRootTile() required here) */
static void MakeRootTile(WindowPtr pWin);
#include "../../dix/window.c" #include "../../dix/window.c"
extern Bool nxagentWMIsRunning; extern Bool nxagentWMIsRunning;
...@@ -132,69 +128,8 @@ extern Bool nxagentScreenTrap; ...@@ -132,69 +128,8 @@ extern Bool nxagentScreenTrap;
#undef TEST #undef TEST
#undef DEBUG #undef DEBUG
WindowPtr nxagentRootTileWindow;
extern void nxagentSetVersionProperty(WindowPtr pWin); extern void nxagentSetVersionProperty(WindowPtr pWin);
void nxagentClearSplash(WindowPtr pW)
{
ScreenPtr pScreen = pW->drawable.pScreen;
if (pW->backgroundState == BackgroundPixmap)
{
(*pScreen->DestroyPixmap)(pW->background.pixmap);
}
pW->backgroundState = BackgroundPixel;
pW->background.pixel = nxagentLogoBlack;
(*pScreen->ChangeWindowAttributes)(pW, CWBackPixmap|CWBackPixel);
}
static void
MakeRootTile(WindowPtr pWin)
{
ScreenPtr pScreen = pWin->drawable.pScreen;
GCPtr pGC;
unsigned char back[128];
int len = BitmapBytePad(sizeof(long));
register unsigned char *from, *to;
register int i, j;
pWin->background.pixmap = (*pScreen->CreatePixmap)(pScreen, 4, 4,
pScreen->rootDepth, 0);
pWin->backgroundState = BackgroundPixmap;
pGC = GetScratchGC(pScreen->rootDepth, pScreen);
if (!pWin->background.pixmap || !pGC)
FatalError("could not create root tile");
{
CARD32 attributes[2];
attributes[0] = pScreen->whitePixel;
attributes[1] = pScreen->blackPixel;
(void)ChangeGC(pGC, GCForeground | GCBackground, attributes);
}
ValidateGC((DrawablePtr)pWin->background.pixmap, pGC);
from = (screenInfo.bitmapBitOrder == LSBFirst) ? _back_lsb : _back_msb;
to = back;
for (i = 4; i > 0; i--, from++)
for (j = len; j > 0; j--)
*to++ = *from;
(*pGC->ops->PutImage)((DrawablePtr)pWin->background.pixmap, pGC, 1,
0, 0, len, 4, 0, XYBitmap, (char *)back);
FreeScratchGC(pGC);
nxagentRootTileWindow = pWin;
}
void void
InitRootWindow(WindowPtr pWin) InitRootWindow(WindowPtr pWin)
{ {
...@@ -249,28 +184,12 @@ InitRootWindow(WindowPtr pWin) ...@@ -249,28 +184,12 @@ InitRootWindow(WindowPtr pWin)
pWin->optional->cursor = rootCursor; pWin->optional->cursor = rootCursor;
rootCursor->refcnt++; rootCursor->refcnt++;
#ifdef NXAGENT_SPLASH
if (blackRoot) if (blackRoot)
pWin->background.pixel = pScreen->blackPixel; pWin->background.pixel = pScreen->blackPixel;
else else
pWin->background.pixel = pScreen->whitePixel; pWin->background.pixel = pScreen->whitePixel;
backFlag |= CWBackPixel; backFlag |= CWBackPixel;
MakeRootTile(pWin);
#else
if (!blackRoot && !whiteRoot) {
MakeRootTile(pWin);
backFlag |= CWBackPixmap;
}
else {
if (blackRoot)
pWin->background.pixel = pScreen->blackPixel;
else
pWin->background.pixel = pScreen->whitePixel;
backFlag |= CWBackPixel;
}
#endif
pWin->backingStore = defaultBackingStore; pWin->backingStore = defaultBackingStore;
pWin->forcedBS = (defaultBackingStore != NotUseful); pWin->forcedBS = (defaultBackingStore != NotUseful);
......
...@@ -681,7 +681,7 @@ Bool nxagentReconnectSession(void) ...@@ -681,7 +681,7 @@ Bool nxagentReconnectSession(void)
#endif #endif
saveAgentState("RUNNING"); saveAgentState("RUNNING");
nxagentRemoveSplashWindow(NULL); nxagentRemoveSplashWindow();
/* /*
* We let the proxy flush the link on our behalf * We let the proxy flush the link on our behalf
......
...@@ -146,9 +146,7 @@ Window nxagentInputWindows[MAXSCREENS]; ...@@ -146,9 +146,7 @@ Window nxagentInputWindows[MAXSCREENS];
Window nxagentScreenSaverWindows[MAXSCREENS]; Window nxagentScreenSaverWindows[MAXSCREENS];
#ifdef NXAGENT_ONSTART #ifdef NXAGENT_ONSTART
Atom nxagentWMStart; Atom nxagentReadyAtom;
Window nxagentSplashWindow = None;
Pixmap nxagentPixmapLogo;
#endif #endif
ScreenPtr nxagentDefaultScreen = NULL; ScreenPtr nxagentDefaultScreen = NULL;
...@@ -934,7 +932,7 @@ Bool nxagentOpenScreen(ScreenPtr pScreen, ...@@ -934,7 +932,7 @@ Bool nxagentOpenScreen(ScreenPtr pScreen,
nxagentQueryAtoms(pScreen); nxagentQueryAtoms(pScreen);
#ifdef NXAGENT_ONSTART #ifdef NXAGENT_ONSTART
nxagentWMStart = nxagentAtoms[3]; /* WM_NX_READY */ nxagentReadyAtom = nxagentAtoms[3]; /* WM_NX_READY */
#endif #endif
/* /*
...@@ -3120,10 +3118,7 @@ int nxagentShadowPoll(PixmapPtr nxagentShadowPixmapPtr, GCPtr nxagentShadowGCPtr ...@@ -3120,10 +3118,7 @@ int nxagentShadowPoll(PixmapPtr nxagentShadowPixmapPtr, GCPtr nxagentShadowGCPtr
if (result == 1) if (result == 1)
{ {
if (!nxagentWMPassed) nxagentRemoveSplashWindow();
{
nxagentRemoveSplashWindow(NULL);
}
NXShadowExportChanges(&numRects, &ptBox); NXShadowExportChanges(&numRects, &ptBox);
pBox = (BoxRec *)ptBox; pBox = (BoxRec *)ptBox;
......
...@@ -58,19 +58,24 @@ ...@@ -58,19 +58,24 @@
* Colors used to paint the splash screen. * Colors used to paint the splash screen.
*/ */
int nxagentLogoDepth; #define nxagentLogoWhite 0xffffff
int nxagentLogoWhite; #define nxagentLogoBlack 0x000000
int nxagentLogoRed; #define nxagentLogoDarkGray 0x222222
int nxagentLogoBlack; #define nxagentLogoLightGray 0xbbbbbb
int nxagentLogoGray;
void nxagentPaintLogo(Window win, GC gc, int scale, int width, int height); Pixmap nxagentPixmapLogo;
Window nxagentSplashWindow = None;
Bool nxagentWMPassed = False;
static void nxagentPaintLogo(Window win, GC gc, int scale, int width, int height);
/* /*
* From Screen.c. * From Screen.c.
*/ */
extern Atom nxagentWMStart; #ifdef NXAGENT_ONSTART
extern Atom nxagentReadyAtom;
#endif
/* /*
* From Clipboard.c. * From Clipboard.c.
...@@ -78,27 +83,35 @@ extern Atom nxagentWMStart; ...@@ -78,27 +83,35 @@ extern Atom nxagentWMStart;
extern Atom serverCutProperty; extern Atom serverCutProperty;
int nxagentShowSplashWindow(Window parentWindow) void nxagentShowSplashWindow(Window parentWindow)
{ {
XWindowAttributes getAttributes; XWindowAttributes getAttributes;
XWindowChanges values; XWindowChanges values;
XSetWindowAttributes attributes; XSetWindowAttributes attributes;
GC gc; GC gc;
/*
* Show splash window only when running as X2Go Agent
*/
if(!nxagentX2go)
return;
#ifdef TEST #ifdef TEST
fprintf(stderr, "nxagentShowSplashWindow: Got called.\n"); fprintf(stderr, "%s: Got called.\n", __func__);
#endif #endif
#ifdef NXAGENT_TIMESTAMP #ifdef NXAGENT_TIMESTAMP
{ {
extern unsigned long startTime; extern unsigned long startTime;
fprintf(stderr, "nxagentShowSplashWindow: Initializing splash start at [%d] milliseconds.\n", fprintf(stderr, "%s: Initializing splash start at [%d] milliseconds.\n", __func__,
GetTimeInMillis() - startTime); GetTimeInMillis() - startTime);
} }
#endif #endif
XSetSelectionOwner(nxagentDisplay, nxagentWMStart, None, CurrentTime); #ifdef NXAGENT_ONSTART
XSetSelectionOwner(nxagentDisplay, nxagentReadyAtom, None, CurrentTime);
#endif
nxagentWMPassed = False; nxagentWMPassed = False;
...@@ -133,7 +146,7 @@ int nxagentShowSplashWindow(Window parentWindow) ...@@ -133,7 +146,7 @@ int nxagentShowSplashWindow(Window parentWindow)
getAttributes.height = nxagentOption(RootHeight); getAttributes.height = nxagentOption(RootHeight);
#ifdef TEST #ifdef TEST
fprintf(stderr, "nxagentShowSplashWindow: Going to create new splash window.\n"); fprintf(stderr, "%s: Going to create new splash window.\n", __func__);
#endif #endif
nxagentSplashWindow = nxagentSplashWindow =
...@@ -146,7 +159,7 @@ int nxagentShowSplashWindow(Window parentWindow) ...@@ -146,7 +159,7 @@ int nxagentShowSplashWindow(Window parentWindow)
BlackPixel (nxagentDisplay, 0)); BlackPixel (nxagentDisplay, 0));
#ifdef TEST #ifdef TEST
fprintf(stderr, "nxagentShowSplashWindow: Created new splash window with id [%ld].\n", fprintf(stderr, "%s: Created new splash window with id [%ld].\n", __func__,
nxagentSplashWindow); nxagentSplashWindow);
#endif #endif
...@@ -162,45 +175,34 @@ int nxagentShowSplashWindow(Window parentWindow) ...@@ -162,45 +175,34 @@ int nxagentShowSplashWindow(Window parentWindow)
#ifdef NXAGENT_TIMESTAMP #ifdef NXAGENT_TIMESTAMP
{ {
extern unsigned long startTime; extern unsigned long startTime;
fprintf(stderr, "nxagentShowSplashWindow: Splash ends [%d] milliseconds.\n", fprintf(stderr, "%s: Splash ends [%d] milliseconds.\n", __func__,
GetTimeInMillis() - startTime); GetTimeInMillis() - startTime);
} }
#endif #endif
return True;
} }
void nxagentPaintLogo(Window win, GC gc, int scale, int width, int height) void nxagentPaintLogo(Window win, GC gc, int scale, int width, int height)
{ {
XPoint rect[4]; int depth = DefaultDepth(nxagentDisplay, DefaultScreen(nxagentDisplay));
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, "%s: Got called.\n", __func__);
#endif #endif
#ifdef NXAGENT_LOGO_DEBUG #ifdef NXAGENT_LOGO_DEBUG
fprintf(stderr, "nxagentPaintLogo: begin\n"); fprintf(stderr, "%s: begin\n", __func__);
fprintf(stderr, "nxagentPaintLogo: gen params are: w=%d h=%d d=%d r=%x w=%x b=%x\n",width, height, fprintf(stderr, "%s: gen params are: w=%d h=%d d=%d w=%x b=%x g1=%x g2=%x \n", __func__,
nxagentLogoDepth, nxagentLogoRed, width, height, depth,
nxagentLogoWhite, nxagentLogoBlack); nxagentLogoWhite, nxagentLogoBlack, nxagentLogoDarkGray, nxagentLogoLightGray);
#endif #endif
w = width/scale; int w = width/scale;
h = height/scale; int h = height/scale;
w2 = w/2; int w2 = w/2;
h2 = h/2; int h2 = h/2;
int c;
if (height > width) if (height > width)
{ {
c = w/30; c = w/30;
...@@ -210,42 +212,52 @@ void nxagentPaintLogo(Window win, GC gc, int scale, int width, int height) ...@@ -210,42 +212,52 @@ void nxagentPaintLogo(Window win, GC gc, int scale, int width, int height)
c = w/48; c = w/48;
} }
rect[0].x = 0; rect[0].y = 0;
rect[1].x = 0; rect[1].y = h;
rect[2].x = w; rect[2].y = h;
rect[3].x = w; rect[3].y = 0;
XSetFunction(nxagentDisplay, gc, GXcopy); XSetFunction(nxagentDisplay, gc, GXcopy);
XSetFillStyle(nxagentDisplay, gc, FillSolid); XSetFillStyle(nxagentDisplay, gc, FillSolid);
XSetForeground(nxagentDisplay, gc, nxagentLogoBlack); nxagentPixmapLogo = XCreatePixmap(nxagentDisplay, win, width, height, depth);
XSetBackground(nxagentDisplay, gc, nxagentLogoRed);
nxagentPixmapLogo = XCreatePixmap(nxagentDisplay, win, width, height, nxagentLogoDepth);
if (!nxagentPixmapLogo) if (!nxagentPixmapLogo)
{ {
return; return;
} }
if (blackRoot)
{
XSetForeground(nxagentDisplay, gc, nxagentLogoBlack);
XSetBackground(nxagentDisplay, gc, nxagentLogoWhite);
}
else
{
XSetForeground(nxagentDisplay, gc, nxagentLogoWhite);
XSetBackground(nxagentDisplay, gc, nxagentLogoBlack);
}
XPoint rect[4];
rect[0].x = 0; rect[0].y = 0;
rect[1].x = 0; rect[1].y = h;
rect[2].x = w; rect[2].y = h;
rect[3].x = w; rect[3].y = 0;
/* paint background */
XFillPolygon(nxagentDisplay, nxagentPixmapLogo, gc, rect, 4, Convex, CoordModeOrigin); XFillPolygon(nxagentDisplay, nxagentPixmapLogo, gc, rect, 4, Convex, CoordModeOrigin);
#ifdef NXAGENT_LOGO_DEBUG #ifdef NXAGENT_LOGO_DEBUG
fprintf(stderr, "filled first poly\n"); fprintf(stderr, "%s: filled first poly\n", __func__);
#endif #endif
XSetForeground(nxagentDisplay, gc, nxagentLogoRed);
XSetBackground(nxagentDisplay, gc, nxagentLogoWhite);
/* /*
* Draw X2GO Logo * Draw X2GO Logo
*/ */
if (blackRoot)
XSetForeground(nxagentDisplay, gc, nxagentLogoDarkGray);
else
XSetForeground(nxagentDisplay, gc, nxagentLogoLightGray);
/* /*
* Begin 'X'. * Start 'X'.
*/ */
XSetForeground(nxagentDisplay, gc, nxagentLogoGray);
XSetBackground(nxagentDisplay, gc, nxagentLogoWhite);
rect[0].x = w2-7*c; rect[0].y = h2-5*c; rect[0].x = w2-7*c; rect[0].y = h2-5*c;
rect[1].x = w2-8*c; rect[1].y = h2-5*c; rect[1].x = w2-8*c; rect[1].y = h2-5*c;
rect[2].x = w2-4*c; rect[2].y = h2+3*c; rect[2].x = w2-4*c; rect[2].y = h2+3*c;
...@@ -379,22 +391,28 @@ void nxagentPaintLogo(Window win, GC gc, int scale, int width, int height) ...@@ -379,22 +391,28 @@ void nxagentPaintLogo(Window win, GC gc, int scale, int width, int height)
XSetWindowBackgroundPixmap(nxagentDisplay, win, nxagentPixmapLogo); XSetWindowBackgroundPixmap(nxagentDisplay, win, nxagentPixmapLogo);
#ifdef NXAGENT_LOGO_DEBUG #ifdef NXAGENT_LOGO_DEBUG
fprintf(stderr, "nxagentPaintLogo: end\n"); fprintf(stderr, "%s: end\n", __func__);
#endif #endif
} }
void nxagentRemoveSplashWindow(WindowPtr pWin) void nxagentRemoveSplashWindow(void)
{ {
if (nxagentReconnectTrap) return; if (nxagentWMPassed)
return;
if (nxagentReconnectTrap)
return;
#ifdef TEST #ifdef TEST
fprintf(stderr, "nxagentRemoveSplashWindow: Destroying the splash window.\n"); fprintf(stderr, "%s: Destroying the splash window.\n", __func__);
#endif #endif
if (!nxagentWMPassed) if (!nxagentWMPassed)
{ {
XSetSelectionOwner(nxagentDisplay, nxagentWMStart, #ifdef NXAGENT_ONSTART
XSetSelectionOwner(nxagentDisplay, nxagentReadyAtom,
nxagentDefaultWindows[0], CurrentTime); nxagentDefaultWindows[0], CurrentTime);
#endif
nxagentWMPassed = True; nxagentWMPassed = True;
} }
...@@ -407,7 +425,7 @@ void nxagentRemoveSplashWindow(WindowPtr pWin) ...@@ -407,7 +425,7 @@ void nxagentRemoveSplashWindow(WindowPtr pWin)
nxagentRefreshWindows(screenInfo.screens[0]->root); nxagentRefreshWindows(screenInfo.screens[0]->root);
#ifdef TEST #ifdef TEST
fprintf(stderr, "nxagentRemoveSplashWindow: setting the ownership of %s (%d) on window 0x%lx\n", fprintf(stderr, "%s: setting the ownership of %s (%d) on window 0x%lx\n", __func__
"NX_CUT_BUFFER_SERVER", (int)serverCutProperty, nxagentWindow(screenInfo.screens[0]->root)); "NX_CUT_BUFFER_SERVER", (int)serverCutProperty, nxagentWindow(screenInfo.screens[0]->root));
#endif #endif
...@@ -418,7 +436,6 @@ void nxagentRemoveSplashWindow(WindowPtr pWin) ...@@ -418,7 +436,6 @@ void nxagentRemoveSplashWindow(WindowPtr pWin)
if (nxagentPixmapLogo) if (nxagentPixmapLogo)
{ {
XFreePixmap(nxagentDisplay, nxagentPixmapLogo); XFreePixmap(nxagentDisplay, nxagentPixmapLogo);
nxagentPixmapLogo = (Pixmap) 0; nxagentPixmapLogo = (Pixmap) 0;
} }
} }
...@@ -37,18 +37,9 @@ extern int XdmcpTimeOutRtx; ...@@ -37,18 +37,9 @@ extern int XdmcpTimeOutRtx;
extern int XdmcpStartTime; extern int XdmcpStartTime;
extern int nxagentXdmcpUp; extern int nxagentXdmcpUp;
extern int nxagentLogoDepth;
extern int nxagentLogoWhite;
extern int nxagentLogoRed;
extern int nxagentLogoBlack;
extern int nxagentLogoGray;
extern Window nxagentSplashWindow; extern Window nxagentSplashWindow;
extern int nxagentWMPassed; extern void nxagentShowSplashWindow(Window);
extern void nxagentRemoveSplashWindow();
extern int nxagentShowSplashWindow(Window);
extern void nxagentRemoveSplashWindow(WindowPtr pWin);
#endif /* __Splash_H__ */ #endif /* __Splash_H__ */
...@@ -118,12 +118,6 @@ extern WindowPtr nxagentRootTileWindow; ...@@ -118,12 +118,6 @@ extern WindowPtr nxagentRootTileWindow;
extern Bool nxagentReportPrivateWindowIds; extern Bool nxagentReportPrivateWindowIds;
/*
* Also referenced in Events.c.
*/
int nxagentSplashCount = 0;
#define RECTLIMIT 25 #define RECTLIMIT 25
#define BSPIXMAPLIMIT 128 #define BSPIXMAPLIMIT 128
...@@ -156,12 +150,6 @@ int GetWindowProperty(WindowPtr, Atom, long, long, Bool, Atom, Atom*, int*, ...@@ -156,12 +150,6 @@ int GetWindowProperty(WindowPtr, Atom, long, long, Bool, Atom, Atom*, int*,
unsigned long*, unsigned long*, unsigned char**); unsigned long*, unsigned long*, unsigned char**);
/* /*
* From NXwindow.c.
*/
void nxagentClearSplash(WindowPtr pWin);
/*
* Other local functions. * Other local functions.
*/ */
...@@ -268,16 +256,6 @@ Bool nxagentCreateWindow(WindowPtr pWin) ...@@ -268,16 +256,6 @@ Bool nxagentCreateWindow(WindowPtr pWin)
return True; return True;
} }
nxagentSplashCount++;
if (nxagentSplashCount == 2)
{
nxagentClearSplash(nxagentRootTileWindow);
}
#ifdef NXAGENT_LOGO_DEBUG
fprintf(stderr, "nxagentCreateWindow: nxagentSplashCount [%d]\n", nxagentSplashCount);
#endif
if (pWin->drawable.class == InputOnly) if (pWin->drawable.class == InputOnly)
{ {
mask = CWEventMask; mask = CWEventMask;
...@@ -487,14 +465,6 @@ Bool nxagentCreateWindow(WindowPtr pWin) ...@@ -487,14 +465,6 @@ Bool nxagentCreateWindow(WindowPtr pWin)
nxagentWindowPriv(pWin)->siblingAbove = None; nxagentWindowPriv(pWin)->siblingAbove = None;
nxagentWindowPriv(pWin)->pPicture = NULL; nxagentWindowPriv(pWin)->pPicture = NULL;
if (nxagentRootTileWindow)
{
if (nxagentWindowPriv(pWin)->window != nxagentWindowPriv(nxagentRootTileWindow)->window)
{
XClearWindow(nxagentDisplay, nxagentWindowPriv(nxagentRootTileWindow)->window);
}
}
if (pWin->nextSib) if (pWin->nextSib)
{ {
nxagentWindowPriv(pWin->nextSib)->siblingAbove = nxagentWindow(pWin); nxagentWindowPriv(pWin->nextSib)->siblingAbove = nxagentWindow(pWin);
...@@ -662,24 +632,6 @@ Bool nxagentDestroyWindow(WindowPtr pWin) ...@@ -662,24 +632,6 @@ Bool nxagentDestroyWindow(WindowPtr pWin)
nxagentRootlessDelTopLevelWindow(pWin); nxagentRootlessDelTopLevelWindow(pWin);
} }
nxagentSplashCount--;
#ifdef DEBUG
fprintf(stderr, "nxagentDestroyWindow: The splash counter is now [%d].\n",
nxagentSplashCount);
#endif
if (nxagentSplashCount == 1)
{
XClearWindow(nxagentDisplay, nxagentWindowPriv(nxagentRootTileWindow) -> window);
}
if (pWin == nxagentRootTileWindow)
{
nxagentWindowPriv(nxagentRootTileWindow)->window = None;
nxagentRootTileWindow = None;
}
pWindowPriv->window = None; pWindowPriv->window = None;
if (pWin -> optional) if (pWin -> optional)
...@@ -1486,7 +1438,6 @@ void nxagentConfigureWindow(WindowPtr pWin, unsigned int mask) ...@@ -1486,7 +1438,6 @@ void nxagentConfigureWindow(WindowPtr pWin, unsigned int mask)
#endif #endif
} }
#ifdef NXAGENT_SPLASH
/* /*
* This should bring again the splash window * This should bring again the splash window
* on top, so why the else clause? Is this * on top, so why the else clause? Is this
...@@ -1512,7 +1463,6 @@ void nxagentConfigureWindow(WindowPtr pWin, unsigned int mask) ...@@ -1512,7 +1463,6 @@ void nxagentConfigureWindow(WindowPtr pWin, unsigned int mask)
* } * }
* } * }
*/ */
#endif /* NXAGENT_SPLASH */
if (mask & CW_RootlessRestack) if (mask & CW_RootlessRestack)
{ {
......
...@@ -142,8 +142,10 @@ to authenticate access. See also the \fIxdm\fP(1) and ...@@ -142,8 +142,10 @@ to authenticate access. See also the \fIxdm\fP(1) and
disables backing store support on all screens. disables backing store support on all screens.
.TP 8 .TP 8
.B \-br .B \-br
sets the default root window to solid black instead of the standard root weave sets the default root window to solid black (default).
pattern. .TP 8
.B \-wr
sets the default root window to solid white.
.TP 8 .TP 8
.B \-c .B \-c
turns off key-click. turns off key-click.
......
...@@ -634,6 +634,7 @@ void UseMsg(void) ...@@ -634,6 +634,7 @@ void UseMsg(void)
ErrorF("v video blanking for screen-saver\n"); ErrorF("v video blanking for screen-saver\n");
ErrorF("-v screen-saver without video blanking\n"); ErrorF("-v screen-saver without video blanking\n");
ErrorF("-wm WhenMapped default backing-store\n"); ErrorF("-wm WhenMapped default backing-store\n");
ErrorF("-wr create root window with white background\n");
ErrorF("-maxbigreqsize set maximal bigrequest size \n"); ErrorF("-maxbigreqsize set maximal bigrequest size \n");
#ifdef PANORAMIX #ifdef PANORAMIX
ErrorF("+xinerama Enable XINERAMA (PanoramiX) extension\n"); ErrorF("+xinerama Enable XINERAMA (PanoramiX) extension\n");
...@@ -996,6 +997,8 @@ ProcessCommandLine(int argc, char *argv[]) ...@@ -996,6 +997,8 @@ ProcessCommandLine(int argc, char *argv[])
defaultScreenSaverBlanking = DontPreferBlanking; defaultScreenSaverBlanking = DontPreferBlanking;
else if ( strcmp( argv[i], "-wm") == 0) else if ( strcmp( argv[i], "-wm") == 0)
defaultBackingStore = WhenMapped; defaultBackingStore = WhenMapped;
else if ( strcmp( argv[i], "-wr") == 0)
whiteRoot = TRUE;
else if ( strcmp( argv[i], "-maxbigreqsize") == 0) { else if ( strcmp( argv[i], "-maxbigreqsize") == 0) {
if(++i < argc) { if(++i < argc) {
long reqSizeArg = atol(argv[i]); long reqSizeArg = atol(argv[i]);
......
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