aboutsummaryrefslogtreecommitdiff
path: root/nx-X11/programs/Xserver/hw/nxagent
diff options
context:
space:
mode:
authorUlrich Sibiller <uli42@gmx.de>2024-06-04 21:01:41 +0200
committerUlrich Sibiller <uli42@gmx.de>2024-06-05 00:06:57 +0200
commit77fa3c03cbc25aa34e9bb356c1de7cad4d2ef874 (patch)
treec0e7a9b269e0459b2549e07f3de02ded902ee2a5 /nx-X11/programs/Xserver/hw/nxagent
parent20e360c75996a61a81f10433ca2eb8f7af62ab2e (diff)
downloadnx-libs-77fa3c03cbc25aa34e9bb356c1de7cad4d2ef874.tar.gz
nx-libs-77fa3c03cbc25aa34e9bb356c1de7cad4d2ef874.tar.bz2
nx-libs-77fa3c03cbc25aa34e9bb356c1de7cad4d2ef874.zip
Window.c: improve TEST/DEBUG output
Diffstat (limited to 'nx-X11/programs/Xserver/hw/nxagent')
-rw-r--r--nx-X11/programs/Xserver/hw/nxagent/Window.c322
1 files changed, 182 insertions, 140 deletions
diff --git a/nx-X11/programs/Xserver/hw/nxagent/Window.c b/nx-X11/programs/Xserver/hw/nxagent/Window.c
index 75bdae510..f1a430164 100644
--- a/nx-X11/programs/Xserver/hw/nxagent/Window.c
+++ b/nx-X11/programs/Xserver/hw/nxagent/Window.c
@@ -266,7 +266,7 @@ Bool nxagentCreateWindow(WindowPtr pWin)
attributes.backing_store = NotUseful;
#ifdef TEST
- fprintf(stderr, "nxagentCreateWindow: Backing store on window at [%p] is [%d].\n",
+ fprintf(stderr, "%s: Backing store on window at [%p] is [%d].\n", __func__,
(void*)pWin, attributes.backing_store);
#endif
@@ -333,16 +333,16 @@ Bool nxagentCreateWindow(WindowPtr pWin)
*/
#ifdef TEST
- fprintf(stderr, "nxagentCreateWindow: Going to create new window.\n");
+ fprintf(stderr, "%s: Going to create new window.\n", __func__);
#endif
#ifdef TEST
- fprintf(stderr, "nxagentCreateWindow: Creating %swindow at %p current event mask = %lX mask & CWEventMask = %ld "
- "event_mask = %lX\n",
- nxagentWindowTopLevel(pWin) ? "toplevel " : "", (void*)pWin, pWin -> eventMask,
+ fprintf(stderr, "%s: Creating %swindow at [%p][0x%x] current event mask [%X] mask & CWEventMask [%ld] "
+ "event_mask [%lX]\n", __func__,
+ nxagentWindowTopLevel(pWin) ? "toplevel " : "", (void*)pWin, pWin->drawable.id, pWin -> eventMask,
mask & CWEventMask, attributes.event_mask);
- fprintf(stderr, "nxagentCreateWindow: position [%d,%d] size [%d,%d] depth [%d] border [%d] class [%d].\n",
+ fprintf(stderr, "%s: position [%d,%d] size [%d,%d] depth [%d] border [%d] class [%d].\n", __func__,
pWin->origin.x - wBorderWidth(pWin), pWin->origin.y - wBorderWidth(pWin),
pWin->drawable.width, pWin->drawable.height, pWin->drawable.depth, pWin->borderWidth,
pWin->drawable.class);
@@ -447,12 +447,12 @@ Bool nxagentCreateWindow(WindowPtr pWin)
if (ChangeWindowProperty(pWin, prop, XA_WINDOW, 32, PropModeReplace, 1, nxagentWindowPriv(pWin), 1) != Success)
{
- fprintf(stderr, "nxagentCreateWindow: Adding NX_REAL_WINDOW failed.\n");
+ fprintf(stderr, "%s: Adding NX_REAL_WINDOW failed.\n", __func__);
}
#ifdef DEBUG
else
{
- fprintf(stderr, "nxagentCreateWindow: Added NX_REAL_WINDOW for Window ID [%x].\n", nxagentWindowPriv(pWin)->window);
+ fprintf(stderr, "%s: Added NX_REAL_WINDOW for Window ID [0x%x].\n", __func__, nxagentWindowPriv(pWin)->window);
}
#endif
}
@@ -544,6 +544,11 @@ Bool nxagentDestroyWindow(WindowPtr pWin)
return 1;
}
+ #ifdef DEBUG
+ fprintf(stderr, "%s: Called with window [%p][0x%x] remote [0x%x].\n", __func__,
+ (void *) pWin, pWin->drawable.id, nxagentWindow(pWin));
+ #endif
+
nxagentClearClipboard(NULL, pWin);
for (int j = 0; j < nxagentExposeQueue.length; j++)
@@ -601,7 +606,7 @@ Bool nxagentDestroyWindow(WindowPtr pWin)
nxagentSynchronization.pDrawable = NULL;
#ifdef TEST
- fprintf(stderr, "nxagentDestroyWindow: Synchronization drawable [%p] removed from resources.\n",
+ fprintf(stderr, "%s: Synchronization drawable [%p] removed from resources.\n", __func__,
(void *) pWin);
#endif
}
@@ -632,7 +637,7 @@ Bool nxagentDestroyWindow(WindowPtr pWin)
!nxagentLastWindowDestroyed && nxagentSomeWindowsAreMapped() == False)
{
#ifdef TEST
- fprintf(stderr, "nxagentDestroyWindow: Last mapped window as been destroyed.\n");
+ fprintf(stderr, "%s: Last mapped window as been destroyed.\n", __func__);
#endif
nxagentLastWindowDestroyed = True;
@@ -664,8 +669,8 @@ Bool nxagentPositionWindow(WindowPtr pWin, int x, int y)
}
#ifdef TEST
- fprintf(stderr, "nxagentPositionWindow: Changing position of window [%p][%ld] to [%d,%d].\n",
- (void *) pWin, nxagentWindow(pWin), x, y);
+ fprintf(stderr, "%s: Changing position of window [%p][0x%x] remote [0x%x] to [%d,%d].\n", __func__,
+ (void *) pWin, pWin->drawable.id, nxagentWindow(pWin), x, y);
#endif
nxagentAddConfiguredWindow(pWin, CWSibling | CWX | CWY | CWWidth |
@@ -681,6 +686,11 @@ void nxagentRestackWindow(WindowPtr pWin, WindowPtr pOldNextSib)
return;
}
+ #ifdef DEBUG
+ fprintf(stderr, "%s: Called with window [%p][0x%x] remote [0x%x].\n", __func__,
+ (void *) pWin, pWin->drawable.id, nxagentWindow(pWin));
+ #endif
+
nxagentAddConfiguredWindow(pWin, CW_RootlessRestack);
}
@@ -1074,7 +1084,7 @@ void nxagentMoveViewport(ScreenPtr pScreen, int hShift, int vShift)
*/
#ifdef DEBUG
- fprintf(stderr, "nxagentMoveViewport: RootX[%i] RootY[%i], hShift[%i] vShift[%i].\n",
+ fprintf(stderr, "%s: RootX[%i] RootY[%i], hShift[%i] vShift[%i].\n", __func__,
nxagentOption(RootX), nxagentOption(RootY), hShift, vShift);
#endif
@@ -1146,12 +1156,12 @@ void nxagentMoveViewport(ScreenPtr pScreen, int hShift, int vShift)
if (doMove)
{
#ifdef TEST
- fprintf(stderr, "nxagentMoveViewport: New viewport geometry: (%d, %d)-"
- "(%d, %d)\n", -nxagentOption(RootX), -nxagentOption(RootY),
+ fprintf(stderr, "%s: New viewport geometry: (%d, %d)-"
+ "(%d, %d)\n", __func__, -nxagentOption(RootX), -nxagentOption(RootY),
-nxagentOption(RootX) + nxagentOption(Width),
-nxagentOption(RootY) + nxagentOption(Height));
- fprintf(stderr, "nxagentMoveViewport: Root geometry x=[%d] y=[%d]\n",
+ fprintf(stderr, "%s: Root geometry x=[%d] y=[%d]\n", __func__,
pScreen->root -> drawable.x,
pScreen->root -> drawable.y );
#endif
@@ -1183,7 +1193,7 @@ void nxagentMoveViewport(ScreenPtr pScreen, int hShift, int vShift)
}
#ifdef DEBUG
- fprintf(stderr, "nxagentMoveViewport: hRect p1[%i, %i] - p2[%i, %i].\n", hRect.x1, hRect.y1, hRect.x2, hRect.y2);
+ fprintf(stderr, "%s: hRect p1[%i, %i] - p2[%i, %i].\n", __func__, hRect.x1, hRect.y1, hRect.x2, hRect.y2);
#endif
BoxRec vRect = {.x1 = -newX, .y1 = -newY};
@@ -1201,7 +1211,7 @@ void nxagentMoveViewport(ScreenPtr pScreen, int hShift, int vShift)
}
#ifdef DEBUG
- fprintf(stderr, "nxagentMoveViewport: vRect p1[%i, %i] - p2[%i, %i].\n", vRect.x1, vRect.y1, vRect.x2, vRect.y2);
+ fprintf(stderr, "%s: vRect p1[%i, %i] - p2[%i, %i].\n", __func__, vRect.x1, vRect.y1, vRect.x2, vRect.y2);
#endif
if (oldX != newX && hRect.x1 != hRect.x2 && hRect.y1 != hRect.y2)
@@ -1233,18 +1243,19 @@ void nxagentConfigureWindow(WindowPtr pWin, unsigned int mask)
{
unsigned int valuemask;
XWindowChanges values;
- int offX = nxagentWindowPriv(pWin)->x - pWin->origin.x;
- int offY = nxagentWindowPriv(pWin)->y - pWin->origin.y;
if (nxagentScreenTrap)
{
#ifdef TEST
- fprintf(stderr, "nxagentConfigureWindow: WARNING: Called with the screen trap set.\n");
+ fprintf(stderr, "%s: WARNING: Called with the screen trap set.\n", __func__);
#endif
return;
}
+ int offX = nxagentWindowPriv(pWin)->x - pWin->origin.x;
+ int offY = nxagentWindowPriv(pWin)->y - pWin->origin.y;
+
if (nxagentOption(Rootless) &&
nxagentWindowTopLevel(pWin))
{
@@ -1259,8 +1270,8 @@ void nxagentConfigureWindow(WindowPtr pWin, unsigned int mask)
}
#ifdef TEST
- fprintf(stderr, "nxagentConfigureWindow: Called with window [%p][%ld] and mask [%x].\n",
- (void *) pWin, nxagentWindow(pWin), mask);
+ fprintf(stderr, "%s: Called with window [%p][0x%x] remote [0x%x] and mask [%x].\n", __func__,
+ (void *) pWin, pWin->drawable.id, nxagentWindow(pWin), mask);
#endif
nxagentMoveCorruptedRegion(pWin, mask);
@@ -1311,8 +1322,8 @@ void nxagentConfigureWindow(WindowPtr pWin, unsigned int mask)
if (valuemask)
{
#ifdef TEST
- fprintf(stderr, "nxagentConfigureWindow: Going to configure window [%p][%ld] with mask [%x].\n",
- (void *) pWin, nxagentWindow(pWin), valuemask);
+ fprintf(stderr, "%s: Going to configure window [%p][0x%x] remote [0x%x] with mask [%x].\n", __func__,
+ (void *) pWin, pWin->drawable.id, nxagentWindow(pWin), valuemask);
#endif
if (pWin->bitGravity == StaticGravity &&
@@ -1320,8 +1331,8 @@ void nxagentConfigureWindow(WindowPtr pWin, unsigned int mask)
((mask & CWWidth) || (mask & CWHeight)))
{
#ifdef TEST
- fprintf(stderr, "nxagentConfigureWindow: Window has StaticGravity. Going to translate Expose events by offset [%d, %d].\n",
- offX, offY);
+ fprintf(stderr, "%s: Window has StaticGravity. Going to translate Expose events by offset [%d, %d].\n",
+ __func__, offX, offY);
#endif
nxagentAddStaticResizedWindow(pWin, XNextRequest(nxagentDisplay), offX, offY);
@@ -1363,8 +1374,8 @@ void nxagentConfigureWindow(WindowPtr pWin, unsigned int mask)
values.stack_mode = Above;
#ifdef TEST
- fprintf(stderr, "nxagentConfigureWindow: Going to configure top sibling [%ld] "
- "with mask [%x] and parent [%ld].\n", nxagentWindow(pSib),
+ fprintf(stderr, "%s: Going to configure top sibling [0x%x] "
+ "with mask [%x] and parent [0x%x].\n", __func__, nxagentWindow(pSib),
valuemask, nxagentWindowParent(pWin));
#endif
@@ -1387,8 +1398,8 @@ void nxagentConfigureWindow(WindowPtr pWin, unsigned int mask)
values.sibling = nxagentWindowSiblingAbove(pSib);
#ifdef TEST
- fprintf(stderr, "nxagentConfigureWindow: Going to configure other sibling [%ld] "
- "with mask [%x] and parent [%ld] below [%ld].\n", nxagentWindow(pSib),
+ fprintf(stderr, "%s: Going to configure other sibling [0x%x] "
+ "with mask [%x] and parent [0x%x] below [0x%lx].\n", __func__, nxagentWindow(pSib),
valuemask, nxagentWindowParent(pWin), nxagentWindowSiblingAbove(pSib));
#endif
@@ -1411,7 +1422,7 @@ void nxagentConfigureWindow(WindowPtr pWin, unsigned int mask)
if (result)
{
- fprintf(stderr, "nxagentConfigureWindow: Children of the root: ");
+ fprintf(stderr, "%s: Children of the root: ", __func__);
while(nchildren_return > 0)
{
pSib = nxagentWindowPtr(children_return[--nchildren_return]);
@@ -1424,7 +1435,7 @@ void nxagentConfigureWindow(WindowPtr pWin, unsigned int mask)
}
else
{
- fprintf(stderr, "nxagentConfigureWindow: Failed QueryTree request.\n ");
+ fprintf(stderr, "%s: Failed QueryTree request.\n", __func__);
}
SAFE_XFree(children_return);
@@ -1447,7 +1458,7 @@ void nxagentConfigureWindow(WindowPtr pWin, unsigned int mask)
* values.stack_mode = Above;
*
* #ifdef TEST
- * fprintf(stderr, "nxagentConfigureWindow: Going to configure splash window [%ld].\n",
+ * fprintf(stderr, "%s: Going to configure splash window [0x%x].\n", __func__,
* nxagentSplashWindow);
* #endif
*
@@ -1463,8 +1474,8 @@ void nxagentConfigureWindow(WindowPtr pWin, unsigned int mask)
if (!pWin -> prevSib)
{
#ifdef TEST
- fprintf(stderr, "nxagentConfigureWindow: Raising window [%p][%ld].\n",
- (void *) pWin, nxagentWindow(pWin));
+ fprintf(stderr, "%s: Raising window [%p][0x%x] remote [0x%x].\n", __func__,
+ (void *) pWin, pWin->drawable.id, nxagentWindow(pWin));
#endif
XRaiseWindow(nxagentDisplay, nxagentWindow(pWin));
@@ -1472,8 +1483,8 @@ void nxagentConfigureWindow(WindowPtr pWin, unsigned int mask)
else if (!pWin -> nextSib)
{
#ifdef TEST
- fprintf(stderr, "nxagentConfigureWindow: Lowering window [%p][%ld].\n",
- (void *) pWin, nxagentWindow(pWin));
+ fprintf(stderr, "%sw: Lowering window [%p][0x%x] remote [0x%x].\n", __func__,
+ (void *) pWin, pWin->drawable.id, nxagentWindow(pWin));
#endif
XLowerWindow(nxagentDisplay, nxagentWindow(pWin));
@@ -1483,8 +1494,8 @@ void nxagentConfigureWindow(WindowPtr pWin, unsigned int mask)
XlibWindow windowList[2];
#ifdef TEST
- fprintf(stderr, "nxagentConfigureWindow: Putting window [%p][%ld] in the middle.\n",
- (void *) pWin, nxagentWindow(pWin));
+ fprintf(stderr, "%s: Putting window [%p][0x%x] remote [0x%x] in the middle.\n", __func__,
+ (void *) pWin, pWin->drawable.id, nxagentWindow(pWin));
#endif
windowList[0] = nxagentWindow(pWin->prevSib);
@@ -1528,9 +1539,9 @@ void nxagentReparentWindow(WindowPtr pWin, WindowPtr pOldParent)
}
#ifdef TEST
- fprintf(stderr, "nxagentReparentWindow: window at %p [%lx] previous parent at %p [%lx].\n",
- (void*)pWin, nxagentWindow(pWin),
- (void*)pOldParent, nxagentWindow(pOldParent));
+ fprintf(stderr, "%s: window at [%p][0x%x] remote [0x%x] previous parent at [%p][0x%x] remote [0x%x].\n", __func__,
+ (void*)pWin, pWin->drawable.id, nxagentWindow(pWin),
+ (void*)pOldParent, pOldParent->drawable.id, nxagentWindow(pOldParent));
#endif
XReparentWindow(nxagentDisplay, nxagentWindow(pWin),
@@ -1554,8 +1565,8 @@ Bool nxagentChangeWindowAttributes(WindowPtr pWin, unsigned long mask)
XSetWindowAttributes attributes;
#ifdef TEST
- fprintf(stderr, "nxagentChangeWindowAttributes: Changing attributes for window at [%p] with mask [%lu].\n",
- (void *) pWin, mask);
+ fprintf(stderr, "%s: Changing attributes for window at [%p][0x%x] remote [0x%x] with mask [%lu].\n", __func__,
+ (void*)pWin, pWin->drawable.id, nxagentWindow(pWin), mask);
#endif
if (nxagentScreenTrap)
@@ -1605,8 +1616,8 @@ Bool nxagentChangeWindowAttributes(WindowPtr pWin, unsigned long mask)
nxagentWindowPriv(pWin -> parent) -> hasTransparentChildren = 1;
#ifdef DEBUG
- fprintf(stderr, "nxagentChangeWindowAttributes: WARNING! Window at [%p] got the "
- "hasTransparentChildren flag.\n", (void *) pWin);
+ fprintf(stderr, "%s: WARNING! Window at [%p] got the "
+ "hasTransparentChildren flag.\n", __func__, (void *) pWin);
#endif
}
@@ -1629,8 +1640,8 @@ Bool nxagentChangeWindowAttributes(WindowPtr pWin, unsigned long mask)
if (nxagentDrawableStatus((DrawablePtr) pWin -> background.pixmap) == NotSynchronized)
{
#ifdef TEST
- fprintf(stderr, "nxagentChangeWindowAttributes: The window at [%p] has the background at [%p] "
- "not synchronized.\n", (void *) pWin, (void *) pWin -> background.pixmap);
+ fprintf(stderr, "%s: The window at [%p] has the background at [%p] "
+ "not synchronized.\n", __func__, (void *) pWin, (void *) pWin -> background.pixmap);
#endif
if (nxagentIsCorruptedBackground(pWin -> background.pixmap) == 0)
@@ -1719,8 +1730,8 @@ Bool nxagentChangeWindowAttributes(WindowPtr pWin, unsigned long mask)
attributes.backing_store = pWin -> backingStore;
#ifdef TEST
- fprintf(stderr, "nxagentChangeWindowAttributes: Changing backing store value to %d"
- " for window at %p.\n", pWin -> backingStore, (void*)pWin);
+ fprintf(stderr, "%s: Changing backing store value to %d for window at %p.\n",
+ __func__, pWin -> backingStore, (void*)pWin);
#endif
}
@@ -1792,8 +1803,8 @@ Bool nxagentChangeWindowAttributes(WindowPtr pWin, unsigned long mask)
else
{
#ifdef WARNING
- fprintf(stderr, "nxagentChangeWindowAttributes: WARNING! Bad colormap "
- "[%lu] for window at [%p].\n", wColormap(pWin), (void *) pWin);
+ fprintf(stderr, "%s: WARNING! Bad colormap [%lu] for window at [%p].\n",
+ __func__, wColormap(pWin), (void *) pWin);
#endif
mask &= ~CWColormap;
@@ -1864,7 +1875,8 @@ void nxagentSetWMState(WindowPtr pWin, CARD32 desired)
Bool nxagentRealizeWindow(WindowPtr pWin)
{
#ifdef DEBUG
- fprintf(stderr, "%s: running for window [0x%x]....\n", __func__, pWin->drawable.id);
+ fprintf(stderr, "%s: Called with window [%p][0x%x] remote [0x%x].\n", __func__,
+ (void *) pWin, pWin->drawable.id, nxagentWindow(pWin));
#endif
if (nxagentScreenTrap)
@@ -1915,7 +1927,8 @@ Bool nxagentRealizeWindow(WindowPtr pWin)
Bool nxagentUnrealizeWindow(WindowPtr pWin)
{
#ifdef DEBUG
- fprintf(stderr, "%s: running for window [0x%x]....\n", __func__, pWin->drawable.id);
+ fprintf(stderr, "%s: Called with window [%p][0x%x] remote [0x%x].\n", __func__,
+ (void *) pWin, pWin->drawable.id, nxagentWindow(pWin));
#endif
if (nxagentScreenTrap)
@@ -1941,7 +1954,8 @@ Bool nxagentUnrealizeWindow(WindowPtr pWin)
void nxagentFrameBufferPaintWindow(WindowPtr pWin, RegionPtr pRegion, int what)
{
#ifdef DEBUG
- fprintf(stderr, "%s: running for window [0x%x]....\n", __func__, pWin->drawable.id);
+ fprintf(stderr, "%s: Called with window [%p][0x%x] remote [0x%x].\n", __func__,
+ (void *) pWin, pWin->drawable.id, nxagentWindow(pWin));
#endif
if (pWin->backgroundState == BackgroundPixmap)
@@ -1985,7 +1999,8 @@ void nxagentFrameBufferPaintWindow(WindowPtr pWin, RegionPtr pRegion, int what)
void nxagentPaintWindowBackground(WindowPtr pWin, RegionPtr pRegion, int what)
{
#ifdef DEBUG
- fprintf(stderr, "%s: running for window [0x%x]....\n", __func__, pWin->drawable.id);
+ fprintf(stderr, "%s: Called with window [%p][0x%x] remote [0x%x].\n", __func__,
+ (void *) pWin, pWin->drawable.id, nxagentWindow(pWin));
#endif
if (pWin -> realized)
@@ -2005,8 +2020,8 @@ void nxagentPaintWindowBackground(WindowPtr pWin, RegionPtr pRegion, int what)
#ifdef TEST
else
{
- fprintf(stderr, "nxagentPaintWindowBackground: Saving the operation with window "
- "at [%p] not realized.\n", (void *) pWin);
+ fprintf(stderr, "%s: Saving the operation with window at [%p] not realized.\n",
+ __func__, (void *) pWin);
}
#endif
@@ -2025,7 +2040,8 @@ void nxagentPaintWindowBackground(WindowPtr pWin, RegionPtr pRegion, int what)
void nxagentPaintWindowBorder(WindowPtr pWin, RegionPtr pRegion, int what)
{
#ifdef DEBUG
- fprintf(stderr, "%s: running for window [0x%x]....\n", __func__, pWin->drawable.id);
+ fprintf(stderr, "%s: Called with window [%p][0x%x] remote [0x%x].\n", __func__,
+ (void *) pWin, pWin->drawable.id, nxagentWindow(pWin));
#endif
/*
@@ -2069,7 +2085,8 @@ void nxagentPaintWindowBorder(WindowPtr pWin, RegionPtr pRegion, int what)
void nxagentCopyWindow(WindowPtr pWin, xPoint oldOrigin, RegionPtr oldRegion)
{
#ifdef DEBUG
- fprintf(stderr, "%s: running for window [0x%x]....\n", __func__, pWin->drawable.id);
+ fprintf(stderr, "%s: Called with window [%p][0x%x] remote [0x%x].\n", __func__,
+ (void *) pWin, pWin->drawable.id, nxagentWindow(pWin));
#endif
fbCopyWindow(pWin, oldOrigin, oldRegion);
@@ -2086,6 +2103,11 @@ void nxagentCopyWindow(WindowPtr pWin, xPoint oldOrigin, RegionPtr oldRegion)
*/
void nxagentClipNotify(WindowPtr pWin, int dx, int dy)
{
+ #ifdef DEBUG
+ fprintf(stderr, "%s: Called with window [%p][0x%x] remote [0x%x].\n", __func__,
+ (void *) pWin, pWin->drawable.id, nxagentWindow(pWin));
+ #endif
+
/*
* nxagentConfigureWindow(pWin, CWStackMode);
*/
@@ -2117,7 +2139,8 @@ void nxagentClipNotify(WindowPtr pWin, int dx, int dy)
void nxagentWindowExposures(WindowPtr pWin, RegionPtr pRgn, RegionPtr other_exposed)
{
#ifdef DEBUG
- fprintf(stderr, "%s: running for window [0x%x]....\n", __func__, pWin->drawable.id);
+ fprintf(stderr, "%s: Called with window [%p][0x%x] remote [0x%x].\n", __func__,
+ (void *) pWin, pWin->drawable.id, nxagentWindow(pWin));
#endif
/*
@@ -2161,7 +2184,7 @@ void nxagentWindowExposures(WindowPtr pWin, RegionPtr pRgn, RegionPtr other_expo
if (!nxagentExposeArrayIsInitialized)
{
#ifdef TEST
- fprintf(stderr, "nxagentWindowExposures: Initializing expose queue.\n");
+ fprintf(stderr, "%s: Initializing expose queue.\n", __func__);
#endif
for (int i = 0; i < EXPOSED_SIZE; i++)
@@ -2229,8 +2252,8 @@ void nxagentWindowExposures(WindowPtr pWin, RegionPtr pRgn, RegionPtr other_expo
nxagentExposeQueue.exposures[index].remoteRegion, &temp);
#ifdef TEST
- fprintf(stderr, "nxagentWindowExposures: Added region to remoteRegion for window [%ld] to position [%d].\n",
- nxagentWindow(pWin), nxagentExposeQueue.length);
+ fprintf(stderr, "%s: Added region to remoteRegion for window [%p][0x%x] remote [0x%x] to queue pos [%d].\n", __func__,
+ (void *)pWin, pWin->drawable.id, nxagentWindow(pWin), nxagentExposeQueue.length);
#endif
}
else
@@ -2239,8 +2262,8 @@ void nxagentWindowExposures(WindowPtr pWin, RegionPtr pRgn, RegionPtr other_expo
nxagentExposeQueue.exposures[index].localRegion, &temp);
#ifdef TEST
- fprintf(stderr, "nxagentWindowExposures: Added region to localRegion for window [%ld] to position [%d].\n",
- nxagentWindow(pWin), nxagentExposeQueue.length);
+ fprintf(stderr, "%s: Added region to localRegion for window [%p][0x%x] remote [0x%x] to queue pos [%d].\n", __func__,
+ (void *)pWin, pWin->drawable.id, nxagentWindow(pWin), nxagentExposeQueue.length);
#endif
}
@@ -2249,7 +2272,7 @@ void nxagentWindowExposures(WindowPtr pWin, RegionPtr pRgn, RegionPtr other_expo
nxagentExposeQueue.exposures[index].serial = nxagentExposeSerial;
#ifdef TEST
- fprintf(stderr, "nxagentWindowExposures: Added region to queue with serial [%d].\n", nxagentExposeSerial);
+ fprintf(stderr, "%s: Added region to queue with serial [%d].\n", __func__, nxagentExposeSerial);
#endif
/*
@@ -2274,7 +2297,7 @@ void nxagentWindowExposures(WindowPtr pWin, RegionPtr pRgn, RegionPtr other_expo
RegionUninit(&temp);
#ifdef TEST
- fprintf(stderr, "nxagentWindowExposures: WARNING! Reached maximum size of collect exposures vector.\n");
+ fprintf(stderr, "%s: WARNING! Reached maximum size of collect exposures vector.\n", __func__);
#endif
if ((pRgn != NULL && RegionNotEmpty(pRgn) != 0) ||
@@ -2348,8 +2371,8 @@ void nxagentShapeWindow(WindowPtr pWin)
}
#ifdef DEBUG
- fprintf(stderr, "nxagentShapeWindow: Window at [%p][%ld].\n",
- (void *) pWin, nxagentWindow(pWin));
+ fprintf(stderr, "%s: Called with window [%p][0x%x] remote [0x%x].\n", __func__,
+ (void *) pWin, pWin->drawable.id, nxagentWindow(pWin));
#endif
/*
@@ -2360,13 +2383,13 @@ void nxagentShapeWindow(WindowPtr pWin)
wBoundingShape(pWin)))
{
#ifdef DEBUG
- fprintf(stderr, "nxagentShapeWindow: Bounding shape differs.\n");
+ fprintf(stderr, "%s: Bounding shape differs.\n", __func__);
#endif
if (wBoundingShape(pWin))
{
#ifdef DEBUG
- fprintf(stderr, "nxagentShapeWindow: wBounding shape has [%ld] rects.\n",
+ fprintf(stderr, "%s: wBounding shape has [%ld] rects.\n", __func__
RegionNumRects(wBoundingShape(pWin)));
#endif
@@ -2400,7 +2423,7 @@ void nxagentShapeWindow(WindowPtr pWin)
else
{
#ifdef DEBUG
- fprintf(stderr, "nxagentShapeWindow: wBounding shape does not exist. Removing the shape.\n");
+ fprintf(stderr, "%s: wBounding shape does not exist. Removing the shape.\n", __func__);
#endif
RegionEmpty(nxagentWindowPriv(pWin)->boundingShape);
@@ -2413,13 +2436,13 @@ void nxagentShapeWindow(WindowPtr pWin)
if (!nxagentRegionEqual(nxagentWindowPriv(pWin)->clipShape, wClipShape(pWin)))
{
#ifdef DEBUG
- fprintf(stderr, "nxagentShapeWindow: Clip shape differs.\n");
+ fprintf(stderr, "%s: Clip shape differs.\n", __func__);
#endif
if (wClipShape(pWin))
{
#ifdef DEBUG
- fprintf(stderr, "nxagentShapeWindow: wClip shape has [%ld] rects.\n",
+ fprintf(stderr, "%s: wClip shape has [%ld] rects.\n", __func__,
RegionNumRects(wClipShape(pWin)));
#endif
@@ -2453,7 +2476,7 @@ void nxagentShapeWindow(WindowPtr pWin)
else
{
#ifdef DEBUG
- fprintf(stderr, "nxagentShapeWindow: wClip shape does not exist. Removing the shape.\n");
+ fprintf(stderr, "%s: wClip shape does not exist. Removing the shape.\n", __func__);
#endif
RegionEmpty(nxagentWindowPriv(pWin)->clipShape);
@@ -2467,6 +2490,11 @@ void nxagentShapeWindow(WindowPtr pWin)
static int nxagentForceExposure(WindowPtr pWin, void * ptr)
{
+ #ifdef DEBUG
+ fprintf(stderr, "%s: Called with window [%p][0x%x] remote [0x%x].\n", __func__,
+ (void *) pWin, pWin->drawable.id, nxagentWindow(pWin));
+ #endif
+
if (pWin -> drawable.class != InputOnly)
{
WindowPtr pRoot = pWin->drawable.pScreen->root;
@@ -2534,7 +2562,7 @@ void nxagentMapDefaultWindows(void)
*/
#ifdef TEST
- fprintf(stderr, "nxagentMapDefaultWindows: Showing the splash window.\n");
+ fprintf(stderr, "%s: Showing the splash window.\n", __func__);
#endif
nxagentShowSplashWindow(nxagentDefaultWindows[pScreen->myNum]);
@@ -2550,7 +2578,7 @@ void nxagentMapDefaultWindows(void)
if (!nxagentOption(Shadow) || !nxagentWMIsRunning)
{
#ifdef TEST
- fprintf(stderr, "nxagentMapDefaultWindows: Mapping default window id [%ld].\n",
+ fprintf(stderr, "%s: Mapping default window id [0x%x].\n", __func__,
nxagentDefaultWindows[pScreen->myNum]);
#endif
@@ -2596,7 +2624,7 @@ void nxagentMapDefaultWindows(void)
if (nxagentIconWindow != None)
{
#ifdef TEST
- fprintf(stderr, "nxagentMapDefaultWindows: Mapping icon window id [%ld].\n",
+ fprintf(stderr, "%s: Mapping icon window id [0x%x].\n", __func__,
nxagentIconWindow);
#endif
@@ -2614,7 +2642,7 @@ void nxagentMapDefaultWindows(void)
}
#ifdef TEST
- fprintf(stderr, "nxagentMapDefaultWindows: Completed mapping of default windows.\n");
+ fprintf(stderr, "%s: Completed mapping of default windows.\n", __func__);
#endif
}
@@ -2623,7 +2651,7 @@ Bool nxagentDisconnectAllWindows(void)
Bool succeeded = True;
#if defined(NXAGENT_RECONNECT_DEBUG) || defined(NXAGENT_RECONNECT_WINDOW_DEBUG)
- fprintf(stderr, "nxagentDisconnectAllWindows\n");
+ fprintf(stderr, "%s\n", __func__);
#endif
for (int i = 0; i < screenInfo.numScreens; i++)
@@ -2633,7 +2661,7 @@ Bool nxagentDisconnectAllWindows(void)
}
#ifdef NXAGENT_RECONNECT_WINDOW_DEBUG
- fprintf(stderr, "nxagentDisconnectAllWindows: all windows disconnected\n");
+ fprintf(stderr, "%s: all windows disconnected\n", __func__);
#endif
return succeeded;
@@ -2663,8 +2691,8 @@ void nxagentDisconnectWindow(void * p0, XID x1, void * p2)
#endif
#ifdef NXAGENT_RECONNECT_CURSOR_DEBUG
- fprintf(stderr, "nxagentDisconnectWindow: window %p - disconnecting cursor %p ID %lx\n",
- pWin, pCursor, nxagentCursor(pCursor, pScreen));
+ fprintf(stderr, "%s: window [%p] - disconnecting cursor [%p][0x%x]\n", __func__,
+ (void *)pWin, (void *))pCursor, nxagentCursor(pCursor, pScreen));
#endif
nxagentDisconnectCursor(pCursor, (XID)0, pBool);
@@ -2672,8 +2700,8 @@ void nxagentDisconnectWindow(void * p0, XID x1, void * p2)
if (!*pBool)
{
#ifdef WARNING
- fprintf(stderr, "nxagentDisconnectWindow: WARNING failed disconnection of cursor at [%p]"
- " for window at [%p]: ignoring it.\n", (void*)pCursor, (void*)pWin);
+ fprintf(stderr, "%s: WARNING failed disconnection of cursor at [%p]"
+ " for window at [%p]: ignoring it.\n", __func__, (void*)pCursor, (void*)pWin);
#endif
*pBool = True;
@@ -2682,8 +2710,8 @@ void nxagentDisconnectWindow(void * p0, XID x1, void * p2)
#ifdef NXAGENT_RECONNECT_CURSOR_DEBUG
else if (pCursor)
{
- fprintf(stderr, "nxagentDisconnectWindow: window %p - cursor %p already disconnected\n",
- pWin, pCursor);
+ fprintf(stderr, "%s: window [%p] - cursor [%p] already disconnected\n", __func__,
+ (void *)pWin, (void *)pCursor);
}
#endif
@@ -2693,12 +2721,12 @@ void nxagentDisconnectWindow(void * p0, XID x1, void * p2)
if (DeleteProperty(pWin, prop) != Success)
{
- fprintf(stderr, "nxagentDisconnectWindow: Deleting NX_REAL_WINDOW failed.\n");
+ fprintf(stderr, "%s: Deleting NX_REAL_WINDOW failed.\n", __func__);
}
#ifdef DEBUG
else
{
- fprintf(stderr, "nxagentDisconnectWindow: Deleting NX_REAL_WINDOW from Window ID [%x].\n", nxagentWindowPriv(pWin)->window);
+ fprintf(stderr, "%s: Deleting NX_REAL_WINDOW from Window ID [%x].\n", __func__, nxagentWindowPriv(pWin)->window);
}
#endif
}
@@ -2719,13 +2747,13 @@ Bool nxagentReconnectAllWindows(void *p0)
*/
#if defined(NXAGENT_RECONNECT_DEBUG) || defined(NXAGENT_RECONNECT_WINDOW_DEBUG)
- fprintf(stderr, "nxagentReconnectAllWindows\n");
+ fprintf(stderr, "%s\n", __func__);
#endif
if (screenInfo.screens[0]->root -> backgroundState == BackgroundPixmap &&
screenInfo.screens[0]->root -> background.pixmap == NULL)
{
- FatalError("nxagentReconnectAllWindows: correct the FIXME\n");
+ FatalError("%s: correct the FIXME\n", __func__);
}
if (nxagentOption(Fullscreen))
@@ -2737,7 +2765,7 @@ Bool nxagentReconnectAllWindows(void *p0)
if (!nxagentLoopOverWindows(nxagentReconnectWindow))
{
#ifdef WARNING
- fprintf(stderr, "nxagentReconnectAllWindows: couldn't recreate windows\n");
+ fprintf(stderr, "%s: couldn't recreate windows\n", __func__);
#endif
return False;
@@ -2745,13 +2773,13 @@ Bool nxagentReconnectAllWindows(void *p0)
#ifdef NXAGENT_RECONNECT_WINDOW_DEBUG
XSync(nxagentDisplay, 0);
- fprintf(stderr, "nxagentReconnectAllWindows: all windows recreated\n");
+ fprintf(stderr, "%s: all windows recreated\n", __func__);
#endif
if (!nxagentLoopOverWindows(nxagentReconfigureWindow))
{
#ifdef WARNING
- fprintf(stderr, "nxagentReconnectAllWindows: couldn't reconfigure windows\n");
+ fprintf(stderr, "%s: couldn't reconfigure windows\n", __func__);
#endif
return False;
@@ -2780,13 +2808,13 @@ Bool nxagentReconnectAllWindows(void *p0)
#ifdef NXAGENT_RECONNECT_WINDOW_DEBUG
XSync(nxagentDisplay, 0);
- fprintf(stderr, "nxagentReconnectAllWindows: All windows reconfigured.\n");
+ fprintf(stderr, "%s: All windows reconfigured.\n", __func__);
#endif
if (!nxagentInitClipboard(screenInfo.screens[0]->root))
{
#ifdef WARNING
- fprintf(stderr, "nxagentReconnectAllWindows: WARNING! Couldn't initialize the clipboard.\n");
+ fprintf(stderr, "%s: WARNING! Couldn't initialize the clipboard.\n", __func__);
#endif
return False;
@@ -2794,7 +2822,7 @@ Bool nxagentReconnectAllWindows(void *p0)
#ifdef NXAGENT_RECONNECT_WINDOW_DEBUG
XSync(nxagentDisplay, 0);
- fprintf(stderr, "nxagentReconnectAllWindows: Clipboard initialized.\n");
+ fprintf(stderr, "%s: Clipboard initialized.\n", __func__);
#endif
#ifdef VIEWPORT_FRAME
@@ -2829,20 +2857,20 @@ Bool nxagentSetWindowCursors(void *p0)
*/
#if defined(NXAGENT_RECONNECT_DEBUG) || defined(NXAGENT_RECONNECT_WINDOW_DEBUG)
- fprintf(stderr, "nxagentSetWindowCursors: Going to loop over the windows.\n");
+ fprintf(stderr, "%s Going to loop over the windows.\n", __func__);
#endif
if (!nxagentLoopOverWindows(nxagentReconfigureWindowCursor))
{
#ifdef WARNING
- fprintf(stderr, "nxagentSetWindowCursors: WARNING! Couldn't configure all windows' cursors.\n");
+ fprintf(stderr, "%s WARNING! Couldn't configure all windows' cursors.\n", __func__);
#endif
return False;
}
#ifdef NXAGENT_RECONNECT_WINDOW_DEBUG
- fprintf(stderr, "nxagentSetWindowCursors: All cursors configured.\n");
+ fprintf(stderr, "%s All cursors configured.\n", __func__);
#endif
nxagentReDisplayCurrentCursor();
@@ -2895,7 +2923,8 @@ static void nxagentReconnectWindow(void * param0, XID param1, void * data_buffer
}
#ifdef NXAGENT_RECONNECT_WINDOW_DEBUG
- fprintf(stderr, "nxagentReconnectWindow: %p - ID %lx\n", pWin, nxagentWindow(pWin));
+ fprintf(stderr, "%s: Called with window [%p][0x%x] remote [0x%x].\n", __func__,
+ (void *) pWin, pWin->drawable.id, nxagentWindow(pWin));
#endif
if (pWin->drawable.class == InputOnly)
@@ -2968,10 +2997,10 @@ static void nxagentReconnectWindow(void * param0, XID param1, void * data_buffer
#endif
#ifdef TEST
- fprintf(stderr, "nxagentReconnectWindow: Going to create new window.\n");
- fprintf(stderr, "nxagentReconnectWindow: Recreating %swindow at %p current event mask = %lX mask & CWEventMask = %ld "
- "event_mask = %lX\n",
- nxagentWindowTopLevel(pWin) ? "toplevel " : "", (void*)pWin, pWin -> eventMask,
+ fprintf(stderr, "%s: Going to create new remote window.\n", __func__);
+ fprintf(stderr, "%s: Recreating %swindow at [%p][0x%x] current event mask [%X] mask & CWEventMask [%ld] "
+ "event_mask [%lX]\n", __func__,
+ nxagentWindowTopLevel(pWin) ? "toplevel " : "", (void*)pWin, pWin->drawable.id, pWin -> eventMask,
mask & CWEventMask, attributes.event_mask);
#endif
@@ -3037,8 +3066,7 @@ static void nxagentReconnectWindow(void * param0, XID param1, void * data_buffer
#endif
#ifdef TEST
- fprintf(stderr, "nxagentReconnectWindow: Created new window with id [0x%x].\n",
- nxagentWindowPriv(pWin)->window);
+ fprintf(stderr, "%s: Recreated new remote window with id [0x%x].\n", __func__, nxagentWindow(pWin));
#endif
/*
@@ -3088,7 +3116,7 @@ static void nxagentReconnectWindow(void * param0, XID param1, void * data_buffer
type == XA_WM_SIZE_HINTS)
{
#ifdef TEST
- fprintf(stderr, "nxagentReconnectWindow: setting WMSizeHints on window %p [%lx - %lx].\n",
+ fprintf(stderr, "%s: setting WMSizeHints on window %p [0x%x - 0x%x].\n", __func__,
(void*)pWin, pWin -> drawable.id, nxagentWindow(pWin));
#endif
@@ -3131,7 +3159,7 @@ static void nxagentReconnectWindow(void * param0, XID param1, void * data_buffer
else
{
#ifdef WARNING
- fprintf(stderr, "nxagentReconnectWindow: Failed to get property WM_NORMAL_HINTS on window %p\n",
+ fprintf(stderr, "%s: Failed to get property WM_NORMAL_HINTS on window [%p]\n", __func__,
(void*)pWin);
#endif
}
@@ -3157,12 +3185,12 @@ static void nxagentReconnectWindow(void * param0, XID param1, void * data_buffer
if (ChangeWindowProperty(pWin, prop, XA_WINDOW, 32, PropModeReplace, 1, nxagentWindowPriv(pWin), 1) != Success)
{
- fprintf(stderr, "nxagentReconnectWindow: Updating NX_REAL_WINDOW failed.\n");
+ fprintf(stderr, "%s: Updating NX_REAL_WINDOW failed.\n", __func__);
}
#ifdef DEBUG
else
{
- fprintf(stderr, "nxagentReconnectWindow: Updated NX_REAL_WINDOW for Window ID [%x].\n", nxagentWindowPriv(pWin)->window);
+ fprintf(stderr, "%s: Updated NX_REAL_WINDOW for Window ID [%x].\n", __func__, nxagentWindowPriv(pWin)->window);
}
#endif
}
@@ -3192,8 +3220,8 @@ static void nxagentReconfigureWindowCursor(void * param0, XID param1, void * dat
}
#ifdef DEBUG
- fprintf(stderr, "nxagentReconfigureWindowCursor: [%p] - ID [%lx] geometry [%d,%d,%d,%d] "
- "cursor [%p] - ID [%lx]\n",
+ fprintf(stderr, "%s: [%p] - ID [%lx] geometry [%d,%d,%d,%d] "
+ "cursor [%p] - ID [%lx]\n", __func__,
pWin, nxagentWindow(pWin),
pWin -> drawable.x,
pWin -> drawable.y,
@@ -3205,7 +3233,7 @@ static void nxagentReconfigureWindowCursor(void * param0, XID param1, void * dat
if (nxagentCursor(pCursor, pScreen) == None)
{
#ifdef NXAGENT_RECONNECT_WINDOW_DEBUG
- fprintf(stderr, "nxagentReconfigureWindowCursor: reconnecting valid cursor [%p]\n",
+ fprintf(stderr, "%s: reconnecting valid cursor [%p]\n", __func__,
(void*)pCursor);
#endif
@@ -3214,8 +3242,8 @@ static void nxagentReconfigureWindowCursor(void * param0, XID param1, void * dat
if (!*pBool)
{
#ifdef WARNING
- fprintf(stderr, "nxagentReconfigureWindowCursor: WARNING "
- "failed reconnection of cursor at [%p] for window at [%p]: ignoring it.\n",
+ fprintf(stderr, "%s: WARNING "
+ "failed reconnection of cursor at [%p] for window at [%p]: ignoring it.\n", __func__,
(void*)pCursor, (void*)pWin);
#endif
@@ -3235,7 +3263,8 @@ static void nxagentReconfigureWindow(void * param0, XID param1, void * data_buff
unsigned long mask = 0;
#ifdef DEBUG
- fprintf(stderr, "nxagentReconfigureWindow: pWin [%p] - ID [%lx]\n", pWin, nxagentWindow(pWin));
+ fprintf(stderr, "%s: Called with window [%p][0x%x] remote [0x%x].\n", __func__,
+ (void *) pWin, pWin->drawable.id, nxagentWindow(pWin));
#endif
if (pWin -> drawable.class == InputOnly)
@@ -3332,7 +3361,7 @@ static _X_UNUSED Bool nxagentCheckWindowIntegrity(WindowPtr pWin)
char *data = calloc(1, length);
if (data == NULL)
{
- FatalError("nxagentCheckWindowIntegrity: Failed to allocate a buffer of size [%d].\n", length);
+ FatalError("%s: Failed to allocate a buffer of size [%d].\n", __func__, length);
}
unsigned long plane_mask = AllPlanes;
@@ -3367,19 +3396,19 @@ static _X_UNUSED Bool nxagentCheckWindowIntegrity(WindowPtr pWin)
#endif
#ifdef WARNING
- fprintf(stderr, "nxagentCheckWindowIntegrity: Window [%p] geometry [%d,%d], has been realized "
- "but the data buffer still differs.\n", (void*) pWin, width, height);
- fprintf(stderr, "nxagentCheckWindowIntegrity: bytes_per_line = [%d] byte pad [%d] format [%d].\n",
+ fprintf(stderr, "%s: Window [%p] geometry [%d,%d], has been realized "
+ "but the data buffer still differs.\n", __func__, (void*) pWin, width, height);
+ fprintf(stderr, "%s: bytes_per_line = [%d] byte pad [%d] format [%d].\n", __func__,
image -> bytes_per_line, nxagentImagePad(width, height, 0, depth), image->format);
- fprintf(stderr, "nxagentCheckWindowIntegrity: image is corrupted!!\n");
+ fprintf(stderr, "%s: image is corrupted!!\n", __func__);
#endif
}
else
{
#ifdef WARNING
- fprintf(stderr, "nxagentCheckWindowIntegrity: Window [%p] has been realized "
- "now remote and framebuffer data are synchronized.\n", (void*) pWin);
+ fprintf(stderr, "%s: Window [%p] has been realized "
+ "now remote and framebuffer data are synchronized.\n", __func__ ,(void*) pWin);
#endif
}
@@ -3393,7 +3422,7 @@ static _X_UNUSED Bool nxagentCheckWindowIntegrity(WindowPtr pWin)
else
{
#ifdef WARNING
- fprintf(stderr, "nxagentCheckWindowIntegrity: ignored window [%p] with geometry [%d,%d].\n",
+ fprintf(stderr, "%s: ignored window [%p] with geometry [%d,%d].\n", __func__,
(void*) pWin, width, height);
#endif
}
@@ -3498,8 +3527,8 @@ void nxagentFlushConfigureWindow(void)
};
#ifdef DEBUG
- fprintf(stderr, "nxagentFlushConfigureWindow: Sending synch ConfigureWindow for "
- "index [%d] serial [%d].\n", i, nxagentExposeQueue.exposures[i].serial);
+ fprintf(stderr, "%s: Sending synch ConfigureWindow for "
+ "index [%d] serial [%d].\n", __func__, i, nxagentExposeQueue.exposures[i].serial);
#endif
XConfigureWindow(nxagentDisplay, nxagentConfiguredSynchroWindow,
@@ -3545,9 +3574,12 @@ void nxagentPostValidateTree(WindowPtr pParent, WindowPtr pChild, VTKind kind)
*/
void nxagentAddConfiguredWindow(WindowPtr pWin, unsigned int valuemask)
{
- unsigned int mask;
+ #ifdef DEBUG
+ fprintf(stderr, "%s: Called with window [%p][0x%x] remote [0x%x] with mask [%x].\n", __func__,
+ (void *) pWin, pWin->drawable.id, nxagentWindow(pWin), valuemask);
+ #endif
- mask = valuemask & (CWSibling | CWX | CWY | CWWidth | CWHeight |
+ unsigned int mask = valuemask & (CWSibling | CWX | CWY | CWWidth | CWHeight |
CWBorderWidth | CWStackMode | CW_Map | CW_Update | CW_Shape);
valuemask &= ~(CWSibling | CWX | CWY | CWWidth | CWHeight | CWBorderWidth | CWStackMode);
@@ -3622,6 +3654,11 @@ void nxagentDeleteConfiguredWindow(WindowPtr pWin)
{
ConfiguredWindowStruct *index, *previous, *tmp;
+ #ifdef DEBUG
+ fprintf(stderr, "%s: Called with window [%p][0x%x] remote [0x%x].\n", __func__,
+ (void *) pWin, pWin->drawable.id, nxagentWindow(pWin));
+ #endif
+
index = nxagentConfiguredWindowList;
while (index)
@@ -3674,6 +3711,11 @@ void nxagentAddStaticResizedWindow(WindowPtr pWin, unsigned long sequence, int o
{
StaticResizedWindowStruct *tmp = nxagentStaticResizedWindowList;
+ #ifdef DEBUG
+ fprintf(stderr, "%s: Called with window [%p][0x%x] remote [0x%x].\n", __func__,
+ (void *) pWin, pWin->drawable.id, nxagentWindow(pWin));
+ #endif
+
nxagentStaticResizedWindowList = malloc(sizeof(StaticResizedWindowStruct));
if (!nxagentStaticResizedWindowList)
{
@@ -3778,13 +3820,13 @@ void nxagentEmptyBackingStoreRegion(void * param0, XID param1, void * data_buffe
RegionEmpty(&pBackingStore->SavedRegion);
#ifdef TEST
- fprintf(stderr, "nxagentEmptyBackingStoreRegion: Emptying saved region for window at [%p].\n", (void*) pWin);
+ fprintf(stderr, "%s: Emptying saved region for window at [%p].\n", __func__, (void*) pWin);
#endif
if (pBackingStore -> pBackingPixmap != NULL)
{
#ifdef TEST
- fprintf(stderr, "nxagentEmptyBackingStoreRegion: Emptying corrupted region for drawable at [%p].\n",
+ fprintf(stderr, "%s: Emptying corrupted region for drawable at [%p].\n", __func__,
(void*) pBackingStore -> pBackingPixmap);
#endif
@@ -3798,7 +3840,7 @@ void nxagentEmptyAllBackingStoreRegions(void)
if (nxagentLoopOverWindows(nxagentEmptyBackingStoreRegion) == 0)
{
#ifdef WARNING
- fprintf(stderr, "nxagentEmptyAllSavedRegions: Failed to empty backing store saved regions.\n");
+ fprintf(stderr, "%s: Failed to empty backing store saved regions.\n", __func__);
#endif
}
}
@@ -3818,7 +3860,7 @@ int nxagentAddItemBSPixmapList(unsigned long id, PixmapPtr pPixmap, WindowPtr pW
if (nxagentBSPixmapList[i] == NULL)
{
- FatalError("nxagentAddItemBSPixmapList: Failed to allocate memory for nxagentBSPixmapList.\n");
+ FatalError("%s: Failed to allocate memory for nxagentBSPixmapList.\n", __func__);
}
nxagentBSPixmapList[i] -> storingPixmapId = id;
@@ -3828,7 +3870,7 @@ int nxagentAddItemBSPixmapList(unsigned long id, PixmapPtr pPixmap, WindowPtr pW
nxagentBSPixmapList[i] -> backingStoreY = bsy;
#ifdef TEST
- fprintf(stderr, "nxagentAddItemBSPixmapList: Added Pixmap with id [%lu] to nxagentBSPixmapList.\n", id);
+ fprintf(stderr, "%s: Added Pixmap with id [%lu] to nxagentBSPixmapList.\n", __func__, id);
#endif
return 1;
@@ -3842,7 +3884,7 @@ int nxagentAddItemBSPixmapList(unsigned long id, PixmapPtr pPixmap, WindowPtr pW
nxagentBSPixmapList[i] -> backingStoreY = bsy;
#ifdef TEST
- fprintf(stderr, "nxagentAddItemBSPixmapList: Updated existing item for id [%lu].\n", id);
+ fprintf(stderr, "%s: Updated existing item for id [%lu].\n", __func__, id);
#endif
return 1;
@@ -3850,7 +3892,7 @@ int nxagentAddItemBSPixmapList(unsigned long id, PixmapPtr pPixmap, WindowPtr pW
}
#ifdef TEST
- fprintf(stderr, "nxagentAddItemBSPixmapList: WARNING! List item full.\n");
+ fprintf(stderr, "%s: WARNING! List item full.\n", __func__);
#endif
return 0;
@@ -3886,7 +3928,7 @@ int nxagentRemoveItemBSPixmapList(unsigned long pixmapId)
}
#ifdef TEST
- fprintf(stderr, "nxagentRemoveItemBSPixmapList: Removed Pixmap with id [%lu] from list.\n",
+ fprintf(stderr, "%s: Removed Pixmap with id [%lu] from list.\n", __func__,
pixmapId);
#endif
@@ -3895,7 +3937,7 @@ int nxagentRemoveItemBSPixmapList(unsigned long pixmapId)
}
#ifdef TEST
- fprintf(stderr, "nxagentRemoveItemBSPixmapList: WARNING! Can't remove item [%lu]: item not found.\n",
+ fprintf(stderr, "%s: WARNING! Can't remove item [%lu]: item not found.\n", __func__,
pixmapId);
#endif