aboutsummaryrefslogtreecommitdiff
path: root/nx-X11
diff options
context:
space:
mode:
authorUlrich Sibiller <uli42@gmx.de>2020-12-30 23:07:23 +0100
committerMike Gabriel <mike.gabriel@das-netzwerkteam.de>2021-01-15 16:38:11 +0100
commit5920e36e1a36a39deeed55f3efeffb3c84e2846f (patch)
tree6b4b2ea898d78851374204fda6f29d996144a1a6 /nx-X11
parent6f4dbefbf120f8e82171120da3fa347cc1421a26 (diff)
downloadnx-libs-5920e36e1a36a39deeed55f3efeffb3c84e2846f.tar.gz
nx-libs-5920e36e1a36a39deeed55f3efeffb3c84e2846f.tar.bz2
nx-libs-5920e36e1a36a39deeed55f3efeffb3c84e2846f.zip
nxagent: rework some Boolean checks
nxagentWindowTopLevel() and nxagentNeedConnectionChange() return Boolean nxagentPixmapIsVirtual() and nxagentIsShmPixmap(), too.
Diffstat (limited to 'nx-X11')
-rw-r--r--nx-X11/programs/Xserver/hw/nxagent/Drawable.c2
-rw-r--r--nx-X11/programs/Xserver/hw/nxagent/Events.c4
-rw-r--r--nx-X11/programs/Xserver/hw/nxagent/Handlers.c4
-rw-r--r--nx-X11/programs/Xserver/hw/nxagent/NXrender.c4
-rw-r--r--nx-X11/programs/Xserver/hw/nxagent/Pixmap.c2
-rw-r--r--nx-X11/programs/Xserver/hw/nxagent/Reconnect.c2
-rw-r--r--nx-X11/programs/Xserver/hw/nxagent/Window.c2
7 files changed, 10 insertions, 10 deletions
diff --git a/nx-X11/programs/Xserver/hw/nxagent/Drawable.c b/nx-X11/programs/Xserver/hw/nxagent/Drawable.c
index 1cd0a692f..5317d0509 100644
--- a/nx-X11/programs/Xserver/hw/nxagent/Drawable.c
+++ b/nx-X11/programs/Xserver/hw/nxagent/Drawable.c
@@ -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);
diff --git a/nx-X11/programs/Xserver/hw/nxagent/Events.c b/nx-X11/programs/Xserver/hw/nxagent/Events.c
index 704bc6995..f371363a6 100644
--- a/nx-X11/programs/Xserver/hw/nxagent/Events.c
+++ b/nx-X11/programs/Xserver/hw/nxagent/Events.c
@@ -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;
diff --git a/nx-X11/programs/Xserver/hw/nxagent/Handlers.c b/nx-X11/programs/Xserver/hw/nxagent/Handlers.c
index 4085f2b90..01c1e0638 100644
--- a/nx-X11/programs/Xserver/hw/nxagent/Handlers.c
+++ b/nx-X11/programs/Xserver/hw/nxagent/Handlers.c
@@ -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();
}
diff --git a/nx-X11/programs/Xserver/hw/nxagent/NXrender.c b/nx-X11/programs/Xserver/hw/nxagent/NXrender.c
index bcb64edcd..5851eb05c 100644
--- a/nx-X11/programs/Xserver/hw/nxagent/NXrender.c
+++ b/nx-X11/programs/Xserver/hw/nxagent/NXrender.c
@@ -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");
diff --git a/nx-X11/programs/Xserver/hw/nxagent/Pixmap.c b/nx-X11/programs/Xserver/hw/nxagent/Pixmap.c
index c04fe6f8b..30e5d1e3f 100644
--- a/nx-X11/programs/Xserver/hw/nxagent/Pixmap.c
+++ b/nx-X11/programs/Xserver/hw/nxagent/Pixmap.c
@@ -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",
diff --git a/nx-X11/programs/Xserver/hw/nxagent/Reconnect.c b/nx-X11/programs/Xserver/hw/nxagent/Reconnect.c
index ed1e673a8..03ac9effd 100644
--- a/nx-X11/programs/Xserver/hw/nxagent/Reconnect.c
+++ b/nx-X11/programs/Xserver/hw/nxagent/Reconnect.c
@@ -220,7 +220,7 @@ int nxagentHandleConnectionStates(void)
}
}
- if (nxagentNeedConnectionChange() == 1)
+ if (nxagentNeedConnectionChange())
{
#ifdef TEST
fprintf(stderr, "nxagentHandleConnectionStates: Calling nxagentHandleConnectionChanges "
diff --git a/nx-X11/programs/Xserver/hw/nxagent/Window.c b/nx-X11/programs/Xserver/hw/nxagent/Window.c
index fa1910eac..2a872c812 100644
--- a/nx-X11/programs/Xserver/hw/nxagent/Window.c
+++ b/nx-X11/programs/Xserver/hw/nxagent/Window.c
@@ -1260,7 +1260,7 @@ void nxagentConfigureWindow(WindowPtr pWin, unsigned int mask)
}
if (nxagentOption(Rootless) &&
- nxagentWindowTopLevel(pWin) == 1)
+ nxagentWindowTopLevel(pWin))
{
mask &= ~(CWSibling | CWStackMode);
}