Commit 84bad732 authored by Ulrich Sibiller's avatar Ulrich Sibiller Committed by Mike Gabriel

nxagent: rework some Boolean checks

nxagentWindowTopLevel() and nxagentNeedConnectionChange() return Boolean nxagentPixmapIsVirtual() and nxagentIsShmPixmap(), too.
parent f4adcbc5
......@@ -2658,7 +2658,7 @@ void nxagentAllocateCorruptedResource(DrawablePtr pDrawable, RESTYPE type)
*/
if (nxagentPixmapUsageCounter((PixmapPtr) pDrawable) >= MINIMUM_PIXMAP_USAGE_COUNTER &&
nxagentIsShmPixmap((PixmapPtr) pDrawable) == 0)
!nxagentIsShmPixmap((PixmapPtr) pDrawable))
{
pRealPixmap = nxagentRealPixmap((PixmapPtr) pDrawable);
......
......@@ -2009,7 +2009,7 @@ FIXME: Don't enqueue the KeyRelease event if the key was not already
if ((pWin = nxagentRootlessTopLevelWindow(X.xunmap.window)) != NULL ||
((pWin = nxagentWindowPtr(X.xunmap.window)) != NULL &&
nxagentWindowTopLevel(pWin) == 1))
nxagentWindowTopLevel(pWin)))
{
nxagentScreenTrap = True;
......@@ -2040,7 +2040,7 @@ FIXME: Don't enqueue the KeyRelease event if the key was not already
if ((pWin = nxagentRootlessTopLevelWindow(X.xmap.window)) != NULL ||
((pWin = nxagentWindowPtr(X.xmap.window)) != NULL &&
nxagentWindowTopLevel(pWin) == 1))
nxagentWindowTopLevel(pWin)))
{
nxagentScreenTrap = True;
......
......@@ -199,7 +199,7 @@ void nxagentBlockHandler(void * data, struct timeval **timeout, void * mask)
#endif
if (nxagentNeedConnectionChange() == 1)
if (nxagentNeedConnectionChange())
{
#ifdef TEST
fprintf(stderr, "nxagentBlockHandler: Calling nxagentHandleConnectionChanges "
......@@ -703,7 +703,7 @@ void nxagentShadowBlockHandler(void * data, struct timeval **timeout, void * mas
fprintf(stderr, "[Begin block]\n");
#endif
if (nxagentNeedConnectionChange() == 1)
if (nxagentNeedConnectionChange())
{
nxagentHandleConnectionChanges();
}
......
......@@ -551,8 +551,8 @@ int nxagentCompositePredicate(PicturePtr pSrc, PicturePtr pDst)
fprintf(stderr, "nxagentCompositePredicate: Case 1.\n");
#endif
if (nxagentPixmapIsVirtual(pPixmap1) == 1 &&
nxagentPixmapIsVirtual(pPixmap2) == 1)
if (nxagentPixmapIsVirtual(pPixmap1) &&
nxagentPixmapIsVirtual(pPixmap2))
{
#ifdef TEST
fprintf(stderr, "nxagentCompositePredicate: Case 2.\n");
......
......@@ -1064,7 +1064,7 @@ void nxagentSynchronizeShmPixmap(DrawablePtr pDrawable, int xPict, int yPict,
int wPict, int hPict)
{
if (pDrawable -> type == DRAWABLE_PIXMAP &&
nxagentIsShmPixmap((PixmapPtr) pDrawable) == 1)
nxagentIsShmPixmap((PixmapPtr) pDrawable))
{
#ifdef TEST
fprintf(stderr, "nxagentSynchronizeShmPixmap: WARNING! Synchronizing shared pixmap at [%p].\n",
......
......@@ -220,7 +220,7 @@ int nxagentHandleConnectionStates(void)
}
}
if (nxagentNeedConnectionChange() == 1)
if (nxagentNeedConnectionChange())
{
#ifdef TEST
fprintf(stderr, "nxagentHandleConnectionStates: Calling nxagentHandleConnectionChanges "
......
......@@ -1260,7 +1260,7 @@ void nxagentConfigureWindow(WindowPtr pWin, unsigned int mask)
}
if (nxagentOption(Rootless) &&
nxagentWindowTopLevel(pWin) == 1)
nxagentWindowTopLevel(pWin))
{
mask &= ~(CWSibling | CWStackMode);
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment