From 63f1fff8fe1e7f94ebc0a72df773c6f77531f7a4 Mon Sep 17 00:00:00 2001 From: Mike Gabriel Date: Wed, 16 Mar 2016 11:11:43 +0100 Subject: Rename region macros to eliminate screen argument This is a huge mechanical patch and a few small fixups required to finish the job. They were reviewed separately, but because the server does not build without both pieces, I've merged them together at this time. The mechanical changes were performed by running the included 'fix-region' script over the whole nx-X11/programs/Xserver tree: $ cd nx-X11/programs/Xserver && ( git ls-files | grep -v '^fix-' | xargs ./fix-region; ) And then, the white space errors in the resulting patch were fixed using the provided fix-patch-whitespace script. $ sh ./fix-patch-whitespace Thanks to Jamey Sharp for the mighty fine sed-generating sed script. v1: Keith Packard (X.Org xserver commit: 2dc138922b7588515d5f2447e4b9dcdc0bef15e0) v2: Mike Gabriel (apply fix-region script to nx-libs) --- nx-X11/programs/Xserver/hw/nxagent/Pixmap.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'nx-X11/programs/Xserver/hw/nxagent/Pixmap.c') diff --git a/nx-X11/programs/Xserver/hw/nxagent/Pixmap.c b/nx-X11/programs/Xserver/hw/nxagent/Pixmap.c index 1dbd059ac..cd2234492 100644 --- a/nx-X11/programs/Xserver/hw/nxagent/Pixmap.c +++ b/nx-X11/programs/Xserver/hw/nxagent/Pixmap.c @@ -160,11 +160,11 @@ PixmapPtr nxagentCreatePixmap(ScreenPtr pScreen, int width, box.x2 = width; box.y2 = height; - pPixmapPriv -> corruptedRegion = REGION_CREATE(pPixmap -> drawable.pScreen, &box, 1); + pPixmapPriv -> corruptedRegion = RegionCreate(&box, 1); } else { - pPixmapPriv -> corruptedRegion = REGION_CREATE(pPixmap -> drawable.pScreen, (BoxRec *) NULL, 1); + pPixmapPriv -> corruptedRegion = RegionCreate((BoxRec *) NULL, 1); } pPixmapPriv -> corruptedBackground = 0; @@ -269,7 +269,7 @@ PixmapPtr nxagentCreatePixmap(ScreenPtr pScreen, int width, pVirtualPriv -> isVirtual = True; pVirtualPriv -> isShared = nxagentShmPixmapTrap; - pVirtualPriv -> corruptedRegion = REGION_CREATE(pVirtual -> drawable.pScreen, (BoxRec *) NULL, 1); + pVirtualPriv -> corruptedRegion = RegionCreate((BoxRec *) NULL, 1); pVirtualPriv -> corruptedBackground = 0; @@ -444,7 +444,7 @@ Bool nxagentDestroyPixmap(PixmapPtr pPixmap) if (pPixmapPriv -> corruptedRegion != NullRegion) { - REGION_DESTROY(pPixmap -> drawable.pScreen, pPixmapPriv -> corruptedRegion); + RegionDestroy(pPixmapPriv -> corruptedRegion); pPixmapPriv -> corruptedRegion = NullRegion; } @@ -512,7 +512,7 @@ Bool nxagentDestroyVirtualPixmap(PixmapPtr pPixmap) if (pVirtualPriv -> corruptedRegion != NullRegion) { - REGION_DESTROY(pVirtual -> drawable.pScreen, pVirtualPriv -> corruptedRegion); + RegionDestroy(pVirtualPriv -> corruptedRegion); pVirtualPriv -> corruptedRegion = NullRegion; } -- cgit v1.2.3 From 5ea2457effe433f4fc66a1a17e0a1ab7527462d6 Mon Sep 17 00:00:00 2001 From: Mike Gabriel Date: Fri, 18 Mar 2016 16:17:30 +0100 Subject: hw/nxagent/Pixmap.c: pBool pointer is only required when compiled in -DTEST mode. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Amends the following compiler warning: ``` Pixmap.c: In function ‘nxagentDisconnectPixmap’: Pixmap.c:755:9: warning: variable ‘pBool’ set but not used [-Wunused-but-set-variable] Bool *pBool; ^ ``` --- nx-X11/programs/Xserver/hw/nxagent/Pixmap.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'nx-X11/programs/Xserver/hw/nxagent/Pixmap.c') diff --git a/nx-X11/programs/Xserver/hw/nxagent/Pixmap.c b/nx-X11/programs/Xserver/hw/nxagent/Pixmap.c index cd2234492..67c514714 100644 --- a/nx-X11/programs/Xserver/hw/nxagent/Pixmap.c +++ b/nx-X11/programs/Xserver/hw/nxagent/Pixmap.c @@ -752,11 +752,11 @@ void nxagentDisconnectPixmap(void *p0, XID x1, void *p2) { PixmapPtr pPixmap = (PixmapPtr) p0; + #ifdef TEST Bool *pBool; pBool = (Bool*) p2; - #ifdef TEST fprintf(stderr, "nxagentDisconnectPixmap: Called with bool [%d] and pixmap at [%p].\n", *pBool, (void *) pPixmap); -- cgit v1.2.3