Unverified Commit b1c42dc9 authored by Mike Gabriel's avatar Mike Gabriel

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

parents 995350d1 7db6cff1
......@@ -517,12 +517,12 @@ void nxagentCheckRestartedClients(struct timeval **timeout)
if (FD_ISSET(fd, &ClientsWithInput))
{
#ifdef WARNING
fprintf(stderr, "nxagentBlockHandler: WARNING! Client [%d] with fd [%d] has input.\n",
fprintf(stderr, "nxagentCheckRestartedClients: WARNING! Client [%d] with fd [%d] has input.\n",
clients[i] -> index, fd);
#endif
#ifdef DEBUG
fprintf(stderr, "nxagentBlockHandler: Setting a null timeout with former timeout [%ld] Ms.\n",
fprintf(stderr, "nxagentCheckRestartedClients: Setting a null timeout with former timeout [%ld] Ms.\n",
(*timeout) -> tv_sec * 1000 + (*timeout) -> tv_usec / 1000);
#endif
......
......@@ -110,7 +110,7 @@ void nxagentCompositeExtensionInit()
#ifdef TEST
else
{
fprintf(stderr, "nxagentRenderExtensionInit: Use of the composite extension not enabled.\n");
fprintf(stderr, "nxagentCompositeExtensionInit: Use of the composite extension not enabled.\n");
}
#endif
}
......@@ -188,7 +188,7 @@ void nxagentUnredirectWindow(WindowPtr pWin)
if (nxagentWindowPriv(pWin) -> isRedirected == 1)
{
#ifdef TEST
fprintf(stderr, "nxagentRedirectWindow: Disabling redirection of window id [%ld] "
fprintf(stderr, "nxagentUnredirectWindow: Disabling redirection of window id [%ld] "
"to off-screen memory.\n", nxagentWindow(pWin));
#endif
......
......@@ -91,7 +91,7 @@ void nxagentResetDialog(int pid)
else if (pid == nxagentFontsReplacementDialogPid)
{
#ifdef TEST
fprintf(stderr, "nxagentFontsReplacementDialog: Resetting fonts replacement dialog pid [%d].\n",
fprintf(stderr, "nxagentResetDialog: Resetting fonts replacement dialog pid [%d].\n",
nxagentFontsReplacementDialogPid);
#endif
......
......@@ -3948,7 +3948,7 @@ void nxagentUngrabPointerAndKeyboard(XEvent *X)
XUngrabKeyboard(nxagentDisplay, now);
#ifdef TEST
fprintf(stderr, "nxagentGrabPointerAndKeyboard: Going to ungrab the pointer in context [B6].\n");
fprintf(stderr, "nxagentUngrabPointerAndKeyboard: Going to ungrab the pointer in context [B6].\n");
#endif
XUngrabPointer(nxagentDisplay, now);
......@@ -3958,10 +3958,11 @@ void nxagentDeactivatePointerGrab()
{
GrabPtr grab = inputInfo.pointer -> grab;
XButtonEvent X;
if (grab)
{
XButtonEvent X;
memset(&X, 0, sizeof(XButtonEvent));
X.type = ButtonRelease;
X.serial = 0;
X.send_event = FALSE;
......
......@@ -423,7 +423,7 @@ void nxagentBlockHandler(void * data, struct timeval **timeout, void * mask)
}
#ifdef TEST
fprintf(stderr, "nxagentDispatchHandler: Reducing the display buffer to [%d] bytes.\n",
fprintf(stderr, "nxagentBlockHandler: Reducing the display buffer to [%d] bytes.\n",
nxagentBuffer);
#endif
......@@ -435,7 +435,7 @@ void nxagentBlockHandler(void * data, struct timeval **timeout, void * mask)
nxagentBuffer = nxagentOption(DisplayBuffer);
#ifdef TEST
fprintf(stderr, "nxagentDispatchHandler: Increasing the display buffer to [%d] bytes.\n",
fprintf(stderr, "nxagentBlockHandler: Increasing the display buffer to [%d] bytes.\n",
nxagentBuffer);
#endif
......@@ -590,7 +590,7 @@ void nxagentWakeupHandler(void * data, int count, void * mask)
#endif
#ifdef TEST
fprintf(stderr, "nxagentBlockHandler: Calling nxagentHandleConnectionStates "
fprintf(stderr, "nxagentWakeupHandler: Calling nxagentHandleConnectionStates "
"with ioError [%d] sigHup [%d].\n", nxagentException.ioError, nxagentException.sigHup);
#endif
......@@ -743,14 +743,14 @@ void nxagentShadowBlockHandler(void * data, struct timeval **timeout, void * mas
if (nxagentSessionState == SESSION_DOWN && nxagentOption(SleepTime) > 0)
{
#ifdef TEST
fprintf(stderr, "nxagentBlockHandler: sleeping for %d milliseconds for slowdown.\n",
fprintf(stderr, "nxagentShadowBlockHandler: sleeping for %d milliseconds for slowdown.\n",
nxagentOption(SleepTime));
#endif
usleep(nxagentOption(SleepTime) * 1000);
}
#ifdef TEST
else if (0 == nxagentOption(SleepTime)) {
fprintf(stderr, "nxagentBlockHandler: not sleeping for slowdown.\n");
fprintf(stderr, "nxagentShadowBlockHandler: not sleeping for slowdown.\n");
}
#endif
......
......@@ -378,14 +378,14 @@ Reply Total Cached Bits In Bits Out Bits/Reply Ratio
* that the agent is ready.
*/
if (!nxagentWMPassed && (nxagentWMtimeout < currentDispatch))
{
nxagentRemoveSplashWindow(NULL);
}
if (!nxagentWMPassed && (nxagentWMtimeout < currentDispatch))
{
nxagentRemoveSplashWindow(NULL);
}
nxagentClients = nClients;
nxagentClients = nClients;
#endif
#endif
if (nready)
{
......@@ -540,6 +540,7 @@ Reply Total Cached Bits In Bits Out Bits/Reply Ratio
#if defined(DDXBEFORERESET)
ddxBeforeReset ();
#endif
/* FIXME: maybe move the code upto the KillAllClients() call to ddxBeforeReset? */
if ((dispatchException & DE_RESET) &&
(serverGeneration > nxagentMaxAllowedResets))
{
......
......@@ -540,7 +540,7 @@ Bool nxagentDestroyVirtualPixmap(PixmapPtr pPixmap)
RegionPtr nxagentPixmapToRegion(PixmapPtr pPixmap)
{
#ifdef TEST
fprintf(stderr, "PixmapToRegion: Pixmap = [%p] nxagentVirtualPixmap = [%p]\n",
fprintf(stderr, "nxagentPixmapToRegion: Pixmap = [%p] nxagentVirtualPixmap = [%p]\n",
(void *) pPixmap, (void *) nxagentVirtualPixmap(pPixmap));
#endif
......@@ -727,7 +727,7 @@ PixmapPtr nxagentPixmapPtr(Pixmap pixmap)
if (pair.pMap == NULL)
{
fprintf(stderr, "nxagentFindPixmap: WARNING! Failed to find "
fprintf(stderr, "nxagentPixmapPtr: WARNING! Failed to find "
"remote pixmap [%ld].\n", (long int) pair.pixmap);
}
else if (nxagentDrawableStatus((DrawablePtr) pair.pMap) == NotSynchronized)
......
......@@ -463,7 +463,7 @@ Bool nxagentReconnectSession(void)
failedStep = DISPLAY_STEP;
#ifdef TEST
fprintf(stderr, "nxagentReconnect: WARNING! Failed display reconnection.\n");
fprintf(stderr, "nxagentReconnectSession: WARNING! Failed display reconnection.\n");
#endif
goto nxagentReconnectError;
......@@ -491,7 +491,7 @@ Bool nxagentReconnectSession(void)
else
{
#ifdef WARNING
fprintf(stderr, "nxagentReconnect: WARNING! Unable to retrieve all the fonts currently in use. "
fprintf(stderr, "nxagentReconnectSession: WARNING! Unable to retrieve all the fonts currently in use. "
"Missing fonts have been replaced.\n");
#endif
......@@ -594,7 +594,7 @@ Bool nxagentReconnectSession(void)
#ifdef WARNING
if (nxagentVerbose == 1)
{
fprintf(stderr, "nxagentReconnect: Failed to reset keyboard device.\n");
fprintf(stderr, "nxagentReconnectSession: Failed to reset keyboard device.\n");
}
#endif
......@@ -638,7 +638,7 @@ Bool nxagentReconnectSession(void)
if (nxagentSessionState != SESSION_GOING_UP)
{
#ifdef WARNING
fprintf(stderr, "nxagentReconnect: WARNING! Unexpected session state [%s] while reconnecting.\n",
fprintf(stderr, "nxagentReconnectSession: WARNING! Unexpected session state [%s] while reconnecting.\n",
DECODE_SESSION_STATE(nxagentSessionState));
#endif
......@@ -666,7 +666,7 @@ Bool nxagentReconnectSession(void)
*/
#ifdef TEST
fprintf(stderr, "nxagentReconnect: Setting the NX flush policy to deferred.\n");
fprintf(stderr, "nxagentReconnectSession: Setting the NX flush policy to deferred.\n");
#endif
NXSetDisplayPolicy(nxagentDisplay, NXPolicyDeferred);
......@@ -680,7 +680,7 @@ nxagentReconnectError:
if (failedStep == DISPLAY_STEP)
{
#ifdef TEST
fprintf(stderr, "nxagentReconnect: Reconnection failed in display step. Restoring options.\n");
fprintf(stderr, "nxagentReconnectSession: Reconnection failed in display step. Restoring options.\n");
#endif
nxagentRestoreOptions();
......@@ -695,19 +695,19 @@ nxagentReconnectError:
#ifdef WARNING
if (nxagentVerbose == 1)
{
fprintf(stderr, "nxagentReconnect: WARNING! The reconnect error message is not set. Failed step is [%d].\n",
fprintf(stderr, "nxagentReconnectSession: WARNING! The reconnect error message is not set. Failed step is [%d].\n",
failedStep);
}
#endif
#ifdef TEST
fprintf(stderr, "nxagentReconnect: Reconnection failed due to a display error.\n");
fprintf(stderr, "nxagentReconnectSession: Reconnection failed due to a display error.\n");
#endif
}
else
{
#ifdef TEST
fprintf(stderr, "nxagentReconnect: Reconnection failed with reason '%s'\n",
fprintf(stderr, "nxagentReconnectSession: Reconnection failed with reason '%s'\n",
nxagentGetReconnectError());
#endif
}
......@@ -721,7 +721,7 @@ nxagentReconnectError:
#ifdef TEST
else
{
fprintf(stderr, "nxagentReconnect: Cannot launch the dialog without a valid display.\n");
fprintf(stderr, "nxagentReconnectSession: Cannot launch the dialog without a valid display.\n");
}
#endif
......
......@@ -1002,7 +1002,7 @@ void nxagentImportProperty(Window window,
wmHints.flags &= ~IconWindowHint;
#ifdef WARNING
fprintf(stderr, "nxagenImportProperty: WARNING! Failed to look up remote icon "
fprintf(stderr, "nxagentImportProperty: WARNING! Failed to look up remote icon "
"window %x from hint importing property [%ld] type %s on window %p.\n",
(unsigned int) wmHints.icon_window,
(long int) property, typeS, (void *) pWin);
......
......@@ -2780,7 +2780,7 @@ int nxagentShadowInit(ScreenPtr pScreen, WindowPtr pWin)
#endif
#ifdef TEST
fprintf(stderr, "nxagentAddXConnection: Adding the X connection [%d] "
fprintf(stderr, "nxagentShadowInit: Adding the X connection [%d] "
"to the device set.\n", fd);
#endif
......
......@@ -86,14 +86,14 @@ int nxagentShowSplashWindow(Window parentWindow)
GC gc;
#ifdef TEST
fprintf(stderr, "nxagentShowSplash: Got called.\n");
fprintf(stderr, "nxagentShowSplashWindow: Got called.\n");
#endif
#ifdef NXAGENT_TIMESTAMP
{
extern unsigned long startTime;
fprintf(stderr, "nxagentShowSplash: Initializing splash start at [%d] milliseconds.\n",
fprintf(stderr, "nxagentShowSplashWindow: Initializing splash start at [%d] milliseconds.\n",
GetTimeInMillis() - startTime);
}
#endif
......@@ -133,7 +133,7 @@ int nxagentShowSplashWindow(Window parentWindow)
getAttributes.height = nxagentOption(RootHeight);
#ifdef TEST
fprintf(stderr, "nxagentShowSplash: Going to create new splash window.\n");
fprintf(stderr, "nxagentShowSplashWindow: Going to create new splash window.\n");
#endif
nxagentSplashWindow =
......@@ -146,7 +146,7 @@ int nxagentShowSplashWindow(Window parentWindow)
BlackPixel (nxagentDisplay, 0));
#ifdef TEST
fprintf(stderr, "nxagentShowSplash: Created new splash window with id [%ld].\n",
fprintf(stderr, "nxagentShowSplashWindow: Created new splash window with id [%ld].\n",
nxagentSplashWindow);
#endif
......@@ -162,7 +162,7 @@ int nxagentShowSplashWindow(Window parentWindow)
#ifdef NXAGENT_TIMESTAMP
{
extern unsigned long startTime;
fprintf(stderr, "nxagentShowSplash: Splash ends [%d] milliseconds.\n",
fprintf(stderr, "nxagentShowSplashWindow: Splash ends [%d] milliseconds.\n",
GetTimeInMillis() - startTime);
}
#endif
......@@ -185,7 +185,7 @@ void nxagentPaintLogo(Window win, GC gc, int scale, int width, int height)
}
#ifdef DEBUG
fprintf(stderr, "nxagenShowtLogo: Got called.\n");
fprintf(stderr, "nxagentPaintLogo: Got called.\n");
#endif
#ifdef NXAGENT_LOGO_DEBUG
......
......@@ -492,14 +492,14 @@ void nxagentReleaseSplit(DrawablePtr pDrawable)
"commits are invalid.\n", pResource -> split);
#endif
FatalError("nxagentCheckSplit: PANIC! Found a region for resource [%d] but the "
FatalError("nxagentReleaseSplit: PANIC! Found a region for resource [%d] but the "
"commits are invalid.\n", pResource -> split);
}
#endif
#ifdef TEST
fprintf(stderr, "nxagentValidateSplit: Aborting the data transfer for resource [%d].\n",
fprintf(stderr, "nxagentReleaseSplit: Aborting the data transfer for resource [%d].\n",
pResource -> split);
#endif
......@@ -734,7 +734,7 @@ void nxagentWaitDrawable(DrawablePtr pDrawable)
if (pResource == NULL)
{
#ifdef TEST
fprintf(stderr, "++++++nxagentWaitDrawable: WARNING! The drawable at [%p] is already awake.\n",
fprintf(stderr, "nxagentWaitDrawable: WARNING! The drawable at [%p] is already awake.\n",
(void *) pDrawable);
#endif
......@@ -742,7 +742,7 @@ void nxagentWaitDrawable(DrawablePtr pDrawable)
}
#ifdef TEST
fprintf(stderr, "++++++nxagentWaitDrawable: Waiting drawable at [%p] with resource [%d].\n",
fprintf(stderr, "nxagentWaitDrawable: Waiting drawable at [%p] with resource [%d].\n",
(void *) pDrawable, pResource -> split);
#endif
......@@ -786,12 +786,12 @@ void nxagentWaitDrawable(DrawablePtr pDrawable)
if (NXDisplayError(nxagentDisplay) == 1)
{
fprintf(stderr, "++++++nxagentWaitDrawable: WARNING! Display error detected while "
fprintf(stderr, "nxagentWaitDrawable: WARNING! Display error detected while "
"waiting for the drawable.\n");
}
else
{
fprintf(stderr, "++++++nxagentWaitDrawable: Drawable at [%p] can now be restarted.\n",
fprintf(stderr, "nxagentWaitDrawable: Drawable at [%p] can now be restarted.\n",
(void *) pDrawable);
}
......@@ -801,7 +801,7 @@ void nxagentWaitDrawable(DrawablePtr pDrawable)
}
#ifdef TEST
fprintf(stderr, "++++++nxagentWaitDrawable: Yielding control to the NX transport.\n");
fprintf(stderr, "nxagentWaitDrawable: Yielding control to the NX transport.\n");
#endif
nxagentWaitEvents(nxagentDisplay, NULL);
......
......@@ -283,7 +283,7 @@ Bool nxagentCreateWindow(pWin)
nxagentClearSplash(nxagentRootTileWindow);
}
#ifdef NXAGENT_LOGO_DEBUG
fprintf(stderr, "nxagentSplashCount: %d\n", nxagentSplashCount);
fprintf(stderr, "nxagentCreateWindow: nxagentSplashCount [%d]\n", nxagentSplashCount);
#endif
if (pWin->drawable.class == InputOnly) {
......@@ -303,7 +303,7 @@ Bool nxagentCreateWindow(pWin)
attributes.backing_store = NotUseful;
#ifdef TEST
fprintf(stderr, "nxagentCreateWindow: Backing store on window at %p is %d.\n",
fprintf(stderr, "nxagentCreateWindow: Backing store on window at [%p] is [%d].\n",
(void*)pWin, attributes.backing_store);
#endif
......@@ -2865,7 +2865,7 @@ Bool nxagentSetWindowCursors(void *p0)
}
#ifdef NXAGENT_RECONNECT_WINDOW_DEBUG
fprintf(stderr, "nxagentLoopOverWindows: All cursors configured.\n");
fprintf(stderr, "nxagentSetWindowCursors: All cursors configured.\n");
#endif
nxagentReDisplayCurrentCursor();
......
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