aboutsummaryrefslogtreecommitdiff
path: root/nx-X11/programs/Xserver/hw/nxagent/Drawable.c
diff options
context:
space:
mode:
authorUlrich Sibiller <uli42@gmx.de>2020-12-30 23:52:32 +0100
committerMike Gabriel <mike.gabriel@das-netzwerkteam.de>2021-01-15 16:38:11 +0100
commitf6b386e652ad70ad29b6413d7050234b1d42829f (patch)
tree90fcef237898a915577cc84e0c53b78aed25105e /nx-X11/programs/Xserver/hw/nxagent/Drawable.c
parent059a3720514d27f9243b4b0521ef710ded2907e2 (diff)
downloadnx-libs-f6b386e652ad70ad29b6413d7050234b1d42829f.tar.gz
nx-libs-f6b386e652ad70ad29b6413d7050234b1d42829f.tar.bz2
nx-libs-f6b386e652ad70ad29b6413d7050234b1d42829f.zip
nxagent: handle RegionNil macro as Boolean
just as the rest of the Xserver is alsow doing
Diffstat (limited to 'nx-X11/programs/Xserver/hw/nxagent/Drawable.c')
-rw-r--r--nx-X11/programs/Xserver/hw/nxagent/Drawable.c38
1 files changed, 19 insertions, 19 deletions
diff --git a/nx-X11/programs/Xserver/hw/nxagent/Drawable.c b/nx-X11/programs/Xserver/hw/nxagent/Drawable.c
index 5317d0509..c335e7ed9 100644
--- a/nx-X11/programs/Xserver/hw/nxagent/Drawable.c
+++ b/nx-X11/programs/Xserver/hw/nxagent/Drawable.c
@@ -396,7 +396,7 @@ int nxagentSynchronizeRegion(DrawablePtr pDrawable, RegionPtr pRegion, unsigned
* The bitmap to synchronize is clipped.
*/
- if (RegionNil(clipRegion) == 1)
+ if (RegionNil(clipRegion))
{
#ifdef TEST
fprintf(stderr, "nxagentSynchronizeRegion: The bitmap region [%d,%d,%d,%d] is not viewable. "
@@ -418,7 +418,7 @@ int nxagentSynchronizeRegion(DrawablePtr pDrawable, RegionPtr pRegion, unsigned
}
else
{
- if (pRegion != NullRegion && RegionNil(pRegion) == 1)
+ if (pRegion != NullRegion && RegionNil(pRegion))
{
#ifdef TEST
fprintf(stderr, "nxagentSynchronizeRegion: Region [%d,%d,%d,%d] is nil. Skipping synchronization.\n",
@@ -451,7 +451,7 @@ int nxagentSynchronizeRegion(DrawablePtr pDrawable, RegionPtr pRegion, unsigned
RegionIntersect(clipRegion, clipRegion, nxagentCorruptedRegion(pDrawable));
- if (RegionNil(clipRegion) == 1)
+ if (RegionNil(clipRegion))
{
#ifdef TEST
fprintf(stderr, "nxagentSynchronizeRegion: The corrupted region [%d,%d,%d,%d] is not viewable "
@@ -473,7 +473,7 @@ int nxagentSynchronizeRegion(DrawablePtr pDrawable, RegionPtr pRegion, unsigned
{
RegionIntersect(clipRegion, clipRegion, pRegion);
- if (RegionNil(clipRegion) == 1)
+ if (RegionNil(clipRegion))
{
#ifdef TEST
fprintf(stderr, "nxagentSynchronizeRegion: Region requested [%d,%d,%d,%d] already "
@@ -888,7 +888,7 @@ nxagentSynchronizeRegionStop:
if (pDrawable -> type == DRAWABLE_PIXMAP &&
nxagentIsCorruptedBackground((PixmapPtr) pDrawable) == 1 &&
- RegionNil(&exposeRegion) == 0)
+ !RegionNil(&exposeRegion))
{
struct nxagentExposeBackground eb = {
.pBackground = (PixmapPtr) pDrawable,
@@ -994,7 +994,7 @@ void nxagentSynchronizeBox(DrawablePtr pDrawable, BoxPtr pBox, unsigned int brea
pBox -> x2 - pBox -> x1, pBox -> y2 - pBox -> y1);
- if (RegionNil(pRegion) == 1)
+ if (RegionNil(pRegion))
{
#ifdef TEST
fprintf(stderr, "nxagentSynchronizeBox: Resulting region [%d,%d,%d,%d] is nil. Skipping synchronization.\n",
@@ -1441,7 +1441,7 @@ RegionPtr nxagentCreateRegion(DrawablePtr pDrawable, GCPtr pGC, int x, int y,
* clipmask.
*/
- if (RegionNil(pRegion) == 0 &&
+ if (!RegionNil(pRegion) &&
pGC != NULL && pGC -> clientClip != NULL &&
pGC -> clientClipType == CT_REGION)
{
@@ -1478,7 +1478,7 @@ RegionPtr nxagentCreateRegion(DrawablePtr pDrawable, GCPtr pGC, int x, int y,
void nxagentMarkCorruptedRegion(DrawablePtr pDrawable, RegionPtr pRegion)
{
- if (pRegion != NullRegion && RegionNil(pRegion) == 1)
+ if (pRegion != NullRegion && RegionNil(pRegion))
{
#ifdef TEST
fprintf(stderr, "nxagentMarkCorruptedRegion: Region [%d,%d,%d,%d] is nil. Skipping operation.\n",
@@ -1552,7 +1552,7 @@ void nxagentMarkCorruptedRegion(DrawablePtr pDrawable, RegionPtr pRegion)
void nxagentUnmarkCorruptedRegion(DrawablePtr pDrawable, RegionPtr pRegion)
{
- if (pRegion != NullRegion && RegionNil(pRegion) == 1)
+ if (pRegion != NullRegion && RegionNil(pRegion))
{
#ifdef TEST
fprintf(stderr, "nxagentUnmarkCorruptedRegion: Region [%d,%d,%d,%d] is nil. Skipping operation.\n",
@@ -2001,7 +2001,7 @@ unsigned long nxagentGetColor(DrawablePtr pDrawable, int xPixel, int yPixel)
unsigned long nxagentGetRegionColor(DrawablePtr pDrawable, RegionPtr pRegion)
{
- if (RegionNil(pRegion) == 1)
+ if (RegionNil(pRegion))
{
return nxagentGetDrawableColor(pDrawable);
}
@@ -2055,7 +2055,7 @@ void nxagentClearRegion(DrawablePtr pDrawable, RegionPtr pRegion)
return;
}
- if (pRegion == NullRegion || RegionNil(pRegion) == 1)
+ if (pRegion == NullRegion || RegionNil(pRegion))
{
#ifdef TEST
fprintf(stderr, "nxagentClearRegion: The region is empty. Exiting.\n");
@@ -2145,7 +2145,7 @@ void nxagentClearRegion(DrawablePtr pDrawable, RegionPtr pRegion)
void nxagentFillRemoteRegion(DrawablePtr pDrawable, RegionPtr pRegion)
{
- if (RegionNil(pRegion) == 1)
+ if (RegionNil(pRegion))
{
return;
}
@@ -2328,7 +2328,7 @@ void nxagentCorruptedRegionOnWindow(void *p0, XID x, void *p2)
nxagentFreeRegion(clipRegion);
- if (RegionNil(&visRegion) == 1)
+ if (RegionNil(&visRegion))
{
#ifdef TEST
fprintf(stderr, "nxagentCorruptedRegionOnWindow: The corrupted region of window at [%p] is hidden.\n",
@@ -2455,7 +2455,7 @@ void nxagentCreateDrawableBitmap(DrawablePtr pDrawable)
RegionIntersect(pClipRegion, pClipRegion, nxagentCorruptedRegion(pDrawable));
- if (RegionNil(pClipRegion) == 1)
+ if (RegionNil(pClipRegion))
{
#ifdef TEST
fprintf(stderr, "nxagentCreateDrawableBitmap: The corrupted region is not visible. Skipping bitmap creation.\n");
@@ -2780,14 +2780,14 @@ void nxagentUnmarkExposedRegion(WindowPtr pWin, RegionPtr pRegion, RegionPtr pOt
{
RegionRec clipRegion;
- if (pRegion != NullRegion && RegionNil(pRegion) == 0 &&
+ if (pRegion != NullRegion && !RegionNil(pRegion) &&
nxagentDrawableStatus((DrawablePtr) pWin) == NotSynchronized)
{
RegionInit(&clipRegion, NullBox, 1);
RegionCopy(&clipRegion, pRegion);
- if (pOther != NullRegion && RegionNil(pOther) == 0)
+ if (pOther != NullRegion && !RegionNil(pOther))
{
RegionUnion(&clipRegion, &clipRegion, pOther);
}
@@ -2871,7 +2871,7 @@ void nxagentSendBackgroundExpose(WindowPtr pWin, PixmapPtr pBackground, RegionPt
RegionSubtract(&expose, &expose, nxagentCorruptedRegion((DrawablePtr) pWin));
- if (RegionNil(&pWin -> clipList) != 0)
+ if (RegionNil(&pWin -> clipList))
{
#ifdef TEST
fprintf(stderr, "nxagentSendBackgroundExpose: Exposures deferred because the window "
@@ -2897,7 +2897,7 @@ void nxagentSendBackgroundExpose(WindowPtr pWin, PixmapPtr pBackground, RegionPt
pBackingStore = (miBSWindowPtr)pWin->backStorage;
- if ((pBackingStore != NULL) && (RegionNil(&pBackingStore->SavedRegion) == 0))
+ if ((pBackingStore != NULL) && !RegionNil(&pBackingStore->SavedRegion))
{
RegionTranslate(&expose, -pWin -> drawable.x, -pWin -> drawable.y);
@@ -2931,7 +2931,7 @@ void nxagentExposeBackgroundPredicate(void *p0, XID x1, void *p2)
struct nxagentExposeBackground *pPair = p2;
- if (RegionNil(pPair -> pExpose) != 0)
+ if (RegionNil(pPair -> pExpose))
{
return;
}