Commit 5920e36e 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 6f4dbefb
...@@ -2658,7 +2658,7 @@ void nxagentAllocateCorruptedResource(DrawablePtr pDrawable, RESTYPE type) ...@@ -2658,7 +2658,7 @@ void nxagentAllocateCorruptedResource(DrawablePtr pDrawable, RESTYPE type)
*/ */
if (nxagentPixmapUsageCounter((PixmapPtr) pDrawable) >= MINIMUM_PIXMAP_USAGE_COUNTER && if (nxagentPixmapUsageCounter((PixmapPtr) pDrawable) >= MINIMUM_PIXMAP_USAGE_COUNTER &&
nxagentIsShmPixmap((PixmapPtr) pDrawable) == 0) !nxagentIsShmPixmap((PixmapPtr) pDrawable))
{ {
pRealPixmap = nxagentRealPixmap((PixmapPtr) pDrawable); pRealPixmap = nxagentRealPixmap((PixmapPtr) pDrawable);
......
...@@ -2009,7 +2009,7 @@ FIXME: Don't enqueue the KeyRelease event if the key was not already ...@@ -2009,7 +2009,7 @@ FIXME: Don't enqueue the KeyRelease event if the key was not already
if ((pWin = nxagentRootlessTopLevelWindow(X.xunmap.window)) != NULL || if ((pWin = nxagentRootlessTopLevelWindow(X.xunmap.window)) != NULL ||
((pWin = nxagentWindowPtr(X.xunmap.window)) != NULL && ((pWin = nxagentWindowPtr(X.xunmap.window)) != NULL &&
nxagentWindowTopLevel(pWin) == 1)) nxagentWindowTopLevel(pWin)))
{ {
nxagentScreenTrap = True; nxagentScreenTrap = True;
...@@ -2040,7 +2040,7 @@ FIXME: Don't enqueue the KeyRelease event if the key was not already ...@@ -2040,7 +2040,7 @@ FIXME: Don't enqueue the KeyRelease event if the key was not already
if ((pWin = nxagentRootlessTopLevelWindow(X.xmap.window)) != NULL || if ((pWin = nxagentRootlessTopLevelWindow(X.xmap.window)) != NULL ||
((pWin = nxagentWindowPtr(X.xmap.window)) != NULL && ((pWin = nxagentWindowPtr(X.xmap.window)) != NULL &&
nxagentWindowTopLevel(pWin) == 1)) nxagentWindowTopLevel(pWin)))
{ {
nxagentScreenTrap = True; nxagentScreenTrap = True;
......
...@@ -199,7 +199,7 @@ void nxagentBlockHandler(void * data, struct timeval **timeout, void * mask) ...@@ -199,7 +199,7 @@ void nxagentBlockHandler(void * data, struct timeval **timeout, void * mask)
#endif #endif
if (nxagentNeedConnectionChange() == 1) if (nxagentNeedConnectionChange())
{ {
#ifdef TEST #ifdef TEST
fprintf(stderr, "nxagentBlockHandler: Calling nxagentHandleConnectionChanges " fprintf(stderr, "nxagentBlockHandler: Calling nxagentHandleConnectionChanges "
...@@ -703,7 +703,7 @@ void nxagentShadowBlockHandler(void * data, struct timeval **timeout, void * mas ...@@ -703,7 +703,7 @@ void nxagentShadowBlockHandler(void * data, struct timeval **timeout, void * mas
fprintf(stderr, "[Begin block]\n"); fprintf(stderr, "[Begin block]\n");
#endif #endif
if (nxagentNeedConnectionChange() == 1) if (nxagentNeedConnectionChange())
{ {
nxagentHandleConnectionChanges(); nxagentHandleConnectionChanges();
} }
......
...@@ -551,8 +551,8 @@ int nxagentCompositePredicate(PicturePtr pSrc, PicturePtr pDst) ...@@ -551,8 +551,8 @@ int nxagentCompositePredicate(PicturePtr pSrc, PicturePtr pDst)
fprintf(stderr, "nxagentCompositePredicate: Case 1.\n"); fprintf(stderr, "nxagentCompositePredicate: Case 1.\n");
#endif #endif
if (nxagentPixmapIsVirtual(pPixmap1) == 1 && if (nxagentPixmapIsVirtual(pPixmap1) &&
nxagentPixmapIsVirtual(pPixmap2) == 1) nxagentPixmapIsVirtual(pPixmap2))
{ {
#ifdef TEST #ifdef TEST
fprintf(stderr, "nxagentCompositePredicate: Case 2.\n"); fprintf(stderr, "nxagentCompositePredicate: Case 2.\n");
......
...@@ -1064,7 +1064,7 @@ void nxagentSynchronizeShmPixmap(DrawablePtr pDrawable, int xPict, int yPict, ...@@ -1064,7 +1064,7 @@ void nxagentSynchronizeShmPixmap(DrawablePtr pDrawable, int xPict, int yPict,
int wPict, int hPict) int wPict, int hPict)
{ {
if (pDrawable -> type == DRAWABLE_PIXMAP && if (pDrawable -> type == DRAWABLE_PIXMAP &&
nxagentIsShmPixmap((PixmapPtr) pDrawable) == 1) nxagentIsShmPixmap((PixmapPtr) pDrawable))
{ {
#ifdef TEST #ifdef TEST
fprintf(stderr, "nxagentSynchronizeShmPixmap: WARNING! Synchronizing shared pixmap at [%p].\n", fprintf(stderr, "nxagentSynchronizeShmPixmap: WARNING! Synchronizing shared pixmap at [%p].\n",
......
...@@ -220,7 +220,7 @@ int nxagentHandleConnectionStates(void) ...@@ -220,7 +220,7 @@ int nxagentHandleConnectionStates(void)
} }
} }
if (nxagentNeedConnectionChange() == 1) if (nxagentNeedConnectionChange())
{ {
#ifdef TEST #ifdef TEST
fprintf(stderr, "nxagentHandleConnectionStates: Calling nxagentHandleConnectionChanges " fprintf(stderr, "nxagentHandleConnectionStates: Calling nxagentHandleConnectionChanges "
......
...@@ -1260,7 +1260,7 @@ void nxagentConfigureWindow(WindowPtr pWin, unsigned int mask) ...@@ -1260,7 +1260,7 @@ void nxagentConfigureWindow(WindowPtr pWin, unsigned int mask)
} }
if (nxagentOption(Rootless) && if (nxagentOption(Rootless) &&
nxagentWindowTopLevel(pWin) == 1) nxagentWindowTopLevel(pWin))
{ {
mask &= ~(CWSibling | CWStackMode); 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