From 39f67db3848d7f856277948f9165f586b62ac589 Mon Sep 17 00:00:00 2001 From: Ulrich Sibiller Date: Wed, 27 Mar 2024 22:41:10 +0100 Subject: Drawable.c: fix build errors with TEST enabled --- nx-X11/programs/Xserver/hw/nxagent/Drawable.c | 15 +++++++++++---- 1 file changed, 11 insertions(+), 4 deletions(-) (limited to 'nx-X11/programs/Xserver/hw') diff --git a/nx-X11/programs/Xserver/hw/nxagent/Drawable.c b/nx-X11/programs/Xserver/hw/nxagent/Drawable.c index 121d54953..6f8ac64a6 100644 --- a/nx-X11/programs/Xserver/hw/nxagent/Drawable.c +++ b/nx-X11/programs/Xserver/hw/nxagent/Drawable.c @@ -282,6 +282,13 @@ int nxagentSynchronizeDrawableData(DrawablePtr pDrawable, unsigned int breakMask static int totalLength; static int totalReconnectedPixmaps; + int width = pDrawable -> width; + int height = pDrawable -> height; + int depth = pDrawable -> depth; + + unsigned int format = (depth == 1) ? XYPixmap : ZPixmap; + int length = nxagentImageLength(width, height, format, 0, depth); + totalLength += length; totalReconnectedPixmaps++; @@ -1531,11 +1538,11 @@ void nxagentMarkCorruptedRegion(DrawablePtr pDrawable, RegionPtr pRegion) { #ifdef TEST - x = pRegion -> extents.x1; - y = pRegion -> extents.y1; + int x = pRegion -> extents.x1; + int y = pRegion -> extents.y1; - width = pRegion -> extents.x2 - pRegion -> extents.x1; - height = pRegion -> extents.y2 - pRegion -> extents.y1; + int width = pRegion -> extents.x2 - pRegion -> extents.x1; + int height = pRegion -> extents.y2 - pRegion -> extents.y1; fprintf(stderr, "nxagentMarkCorruptedRegion: Partly invalidating %s [%p] with " "coordinates [%d,%d][%d,%d].\n", nxagentDrawableType(pDrawable), -- cgit v1.2.3