From 20f5b270d3d289b99063d307c048f121b9544261 Mon Sep 17 00:00:00 2001 From: Jeremy Huddleston Sequoia Date: Sun, 1 Jan 2023 10:47:17 -0800 Subject: [PATCH] rootless: Fixup some format errors in debug logging Signed-off-by: Jeremy Huddleston Sequoia --- miext/rootless/rootlessCommon.h | 1 + miext/rootless/rootlessGC.c | 8 ++++---- miext/rootless/rootlessWindow.c | 12 ++++++------ 3 files changed, 11 insertions(+), 10 deletions(-) diff --git a/miext/rootless/rootlessCommon.h b/miext/rootless/rootlessCommon.h index 83dec3bb7..d9a4d05e9 100644 --- a/miext/rootless/rootlessCommon.h +++ b/miext/rootless/rootlessCommon.h @@ -282,4 +282,5 @@ void RootlessDisableRoot(ScreenPtr pScreen); void RootlessSetPixmapOfAncestors(WindowPtr pWin); +unsigned long RootlessWID(WindowPtr pWindow); #endif /* _ROOTLESSCOMMON_H */ diff --git a/miext/rootless/rootlessGC.c b/miext/rootless/rootlessGC.c index 52d9df9ce..5af18a4a0 100644 --- a/miext/rootless/rootlessGC.c +++ b/miext/rootless/rootlessGC.c @@ -549,7 +549,7 @@ RootlessCopyArea(DrawablePtr pSrc, DrawablePtr dst, GCPtr pGC, GC_SAVE(pGC); GCOP_UNWRAP(pGC); - RL_DEBUG_MSG("copy area start (src 0x%x, dst 0x%x)", pSrc, dst); + RL_DEBUG_MSG("copy area start (src %p, dst %p)", pSrc, dst); if (pSrc->type == DRAWABLE_WINDOW && IsFramedWindow((WindowPtr) pSrc)) { /* If both source and dest are windows, and we're doing @@ -800,7 +800,7 @@ static void RootlessPolySegment(DrawablePtr dst, GCPtr pGC, int nseg, xSegment * pSeg) { GCOP_UNWRAP(pGC); - RL_DEBUG_MSG("poly segment start (win 0x%x)", dst); + RL_DEBUG_MSG("poly segment start (dst %p)", dst); RootlessStartDrawing((WindowPtr) dst); pGC->ops->PolySegment(dst, pGC, nseg, pSeg); @@ -998,7 +998,7 @@ RootlessFillPolygon(DrawablePtr dst, GCPtr pGC, { GC_SAVE(pGC); GCOP_UNWRAP(pGC); - RL_DEBUG_MSG("fill poly start (win 0x%x, fillStyle 0x%x)", dst, + RL_DEBUG_MSG("fill poly start (dst %p, fillStyle 0x%x)", dst, pGC->fillStyle); if (count <= 2) { @@ -1072,7 +1072,7 @@ RootlessPolyFillRect(DrawablePtr dst, GCPtr pGC, { GC_SAVE(pGC); GCOP_UNWRAP(pGC); - RL_DEBUG_MSG("fill rect start (win 0x%x, fillStyle 0x%x)", dst, + RL_DEBUG_MSG("fill rect start (dst %p, fillStyle 0x%x)", dst, pGC->fillStyle); if (nRectsInit <= 0) { diff --git a/miext/rootless/rootlessWindow.c b/miext/rootless/rootlessWindow.c index 106d4320e..fe09c7fe5 100644 --- a/miext/rootless/rootlessWindow.c +++ b/miext/rootless/rootlessWindow.c @@ -325,7 +325,7 @@ RootlessPositionWindow(WindowPtr pWin, int x, int y) RootlessWindowRec *winRec = WINREC(pWin); Bool result; - RL_DEBUG_MSG("positionwindow start (win 0x%x @ %i, %i)\n", pWin, x, y); + RL_DEBUG_MSG("positionwindow start (win %p (%lu) @ %i, %i)\n", pWin, RootlessWID(pWin), x, y); if (winRec) { if (winRec->is_drawing) { @@ -441,7 +441,7 @@ RootlessRealizeWindow(WindowPtr pWin) RegionRec saveRoot; ScreenPtr pScreen = pWin->drawable.pScreen; - RL_DEBUG_MSG("realizewindow start (win 0x%x) ", pWin); + RL_DEBUG_MSG("realizewindow start (win %p (%lu)) ", pWin, RootlessWID(pWin)); if ((IsTopLevel(pWin) && pWin->drawable.class == InputOutput)) { RootlessWindowRec *winRec; @@ -664,7 +664,7 @@ RootlessResizeCopyWindow(WindowPtr pWin, DDXPointRec ptOldOrg, RegionRec rgnDst; int dx, dy; - RL_DEBUG_MSG("resizecopywindowFB start (win 0x%x) ", pWin); + RL_DEBUG_MSG("resizecopywindowFB start (win %p (%lu)) ", pWin, RootlessWID(pWin)); /* Don't unwrap pScreen->CopyWindow. The bogus rewrap with RootlessCopyWindow causes a crash if @@ -733,7 +733,7 @@ RootlessCopyWindow(WindowPtr pWin, DDXPointRec ptOldOrg, RegionPtr prgnSrc) BoxPtr extents; int area; - RL_DEBUG_MSG("copywindowFB start (win 0x%x) ", pWin); + RL_DEBUG_MSG("copywindowFB start (win %p (%lu)) ", pWin, RootlessWID(pWin)); SCREEN_UNWRAP(pScreen, CopyWindow); @@ -1268,7 +1268,7 @@ RootlessResizeWindow(WindowPtr pWin, int x, int y, Bool resize_after = FALSE; RegionRec saveRoot; - RL_DEBUG_MSG("resizewindow start (win 0x%x) ", pWin); + RL_DEBUG_MSG("resizewindow start (win %p (%lu)) ", pWin, RootlessWID(pWin)); if (pWin->parent) { if (winRec) { @@ -1649,7 +1649,7 @@ RootlessSetPixmapOfAncestors(WindowPtr pWin) XID pixel = 0; ChangeWindowAttributes(pWin, CWBackPixel, &pixel, serverClient); - RL_DEBUG_MSG("Cleared ParentRelative on 0x%x.\n", pWin); + RL_DEBUG_MSG("Cleared ParentRelative on %p (%lu).\n", pWin, RootlessWID(pWin)); break; }