aboutsummaryrefslogtreecommitdiff
path: root/nx-X11/programs/Xserver/hw/nxagent/Drawable.c
diff options
context:
space:
mode:
authorUlrich Sibiller <uli42@gmx.de>2019-02-08 00:44:48 +0100
committerUlrich Sibiller <uli42@gmx.de>2019-02-11 13:31:33 +0100
commit16cd2bbe1c4425e3fa557f9ca0723aa94a50b071 (patch)
treed0cb58feeddb553a6e9ab6daea5056bd0221eb2b /nx-X11/programs/Xserver/hw/nxagent/Drawable.c
parent5bbab001a7909b665683e577bc47794edfd294d4 (diff)
downloadnx-libs-16cd2bbe1c4425e3fa557f9ca0723aa94a50b071.tar.gz
nx-libs-16cd2bbe1c4425e3fa557f9ca0723aa94a50b071.tar.bz2
nx-libs-16cd2bbe1c4425e3fa557f9ca0723aa94a50b071.zip
nxagent: rework Bool handling
drop "== False", "== 0", "== True" and "== 0" for nxagentOptions and Traps
Diffstat (limited to 'nx-X11/programs/Xserver/hw/nxagent/Drawable.c')
-rw-r--r--nx-X11/programs/Xserver/hw/nxagent/Drawable.c34
1 files changed, 17 insertions, 17 deletions
diff --git a/nx-X11/programs/Xserver/hw/nxagent/Drawable.c b/nx-X11/programs/Xserver/hw/nxagent/Drawable.c
index 88f3da3a9..a1eb08ad2 100644
--- a/nx-X11/programs/Xserver/hw/nxagent/Drawable.c
+++ b/nx-X11/programs/Xserver/hw/nxagent/Drawable.c
@@ -148,7 +148,7 @@ int nxagentSynchronizeDrawable(DrawablePtr pDrawable, int wait, unsigned int bre
pDrawable = nxagentSplitDrawable(pDrawable);
- if (nxagentLosslessTrap == 0)
+ if (!nxagentLosslessTrap)
{
if (nxagentDrawableStatus(pDrawable) == Synchronized)
{
@@ -171,15 +171,15 @@ int nxagentSynchronizeDrawable(DrawablePtr pDrawable, int wait, unsigned int bre
* transferred in a single operation.
*/
- nxagentFBTrap = 1;
+ nxagentFBTrap = True;
- nxagentSplitTrap = 1;
+ nxagentSplitTrap = True;
result = nxagentSynchronizeDrawableData(pDrawable, breakMask, owner);
- nxagentSplitTrap = 0;
+ nxagentSplitTrap = False;
- nxagentFBTrap = 0;
+ nxagentFBTrap = False;
if (wait == DO_WAIT && nxagentSplitResource(pDrawable) != NULL)
{
@@ -253,7 +253,7 @@ int nxagentSynchronizeDrawableData(DrawablePtr pDrawable, unsigned int breakMask
* compression turned off.
*/
- if (nxagentLosslessTrap == 1)
+ if (nxagentLosslessTrap)
{
pGC = nxagentGetGraphicContext(pDrawable);
@@ -285,7 +285,7 @@ int nxagentSynchronizeDrawableData(DrawablePtr pDrawable, unsigned int breakMask
goto nxagentSynchronizeDrawableDataEnd;
}
- else if (nxagentReconnectTrap == 1)
+ else if (nxagentReconnectTrap)
{
/*
* The pixmap data is not synchronized unless
@@ -298,7 +298,7 @@ int nxagentSynchronizeDrawableData(DrawablePtr pDrawable, unsigned int breakMask
{
#ifdef TEST
- if (nxagentReconnectTrap == 1)
+ if (nxagentReconnectTrap)
{
static int totalLength;
static int totalReconnectedPixmaps;
@@ -586,11 +586,11 @@ int nxagentSynchronizeRegion(DrawablePtr pDrawable, RegionPtr pRegion, unsigned
saveTrap = nxagentGCTrap;
- nxagentGCTrap = 0;
+ nxagentGCTrap = False;
- nxagentFBTrap = 1;
+ nxagentFBTrap = True;
- nxagentSplitTrap = 1;
+ nxagentSplitTrap = True;
pGC = nxagentGetGraphicContext(pDrawable);
@@ -894,7 +894,7 @@ int nxagentSynchronizeRegion(DrawablePtr pDrawable, RegionPtr pRegion, unsigned
if (owner != NULL)
{
- if (nxagentOption(Shadow) == 1 &&
+ if (nxagentOption(Shadow) &&
(nxagentOption(XRatio) != DONT_SCALE ||
nxagentOption(YRatio) != DONT_SCALE))
{
@@ -945,15 +945,15 @@ int nxagentSynchronizeRegion(DrawablePtr pDrawable, RegionPtr pRegion, unsigned
nxagentSynchronizeRegionStop:
- nxagentSplitTrap = 0;
+ nxagentSplitTrap = False;
- nxagentFBTrap = 0;
+ nxagentFBTrap = False;
nxagentGCTrap = saveTrap;
success = 1;
- if (nxagentOption(Shadow) == 0)
+ if (!nxagentOption(Shadow))
{
if (nxagentSynchronization.abort == 1)
{
@@ -1025,7 +1025,7 @@ nxagentSynchronizeRegionStop:
w = RegionRects(&collectedUpdates)[i].x2 - RegionRects(&collectedUpdates)[i].x1;
h = RegionRects(&collectedUpdates)[i].y2 - RegionRects(&collectedUpdates)[i].y1;
- if (nxagentOption(Shadow) == 1 &&
+ if (nxagentOption(Shadow) &&
(nxagentOption(XRatio) != DONT_SCALE ||
nxagentOption(YRatio) != DONT_SCALE))
{
@@ -2633,7 +2633,7 @@ void nxagentCreateDrawableBitmap(DrawablePtr pDrawable)
saveTrap = nxagentGCTrap;
- nxagentGCTrap = 1;
+ nxagentGCTrap = True;
if (nxagentDrawableStatus(pDrawable) == Synchronized)
{