diff options
author | Ulrich Sibiller <uli42@gmx.de> | 2024-06-02 21:45:03 +0200 |
---|---|---|
committer | Ulrich Sibiller <uli42@gmx.de> | 2024-06-04 23:59:43 +0200 |
commit | 13ef42916efa4f4d7acb4f749c4e770774dbf8c4 (patch) | |
tree | 1f569aab05941fab579a7f2e15a4c7a149a77df4 /nx-X11/programs/Xserver/hw/nxagent | |
parent | a22d14005debc9954e21cb5afd23edf252b3126d (diff) | |
download | nx-libs-13ef42916efa4f4d7acb4f749c4e770774dbf8c4.tar.gz nx-libs-13ef42916efa4f4d7acb4f749c4e770774dbf8c4.tar.bz2 nx-libs-13ef42916efa4f4d7acb4f749c4e770774dbf8c4.zip |
NXresource.c: make nxagentFindClientResource return a Boolean
Diffstat (limited to 'nx-X11/programs/Xserver/hw/nxagent')
-rw-r--r-- | nx-X11/programs/Xserver/hw/nxagent/Drawable.c | 14 | ||||
-rw-r--r-- | nx-X11/programs/Xserver/hw/nxagent/NXdispatch.c | 6 | ||||
-rw-r--r-- | nx-X11/programs/Xserver/hw/nxagent/NXresource.c | 6 |
3 files changed, 13 insertions, 13 deletions
diff --git a/nx-X11/programs/Xserver/hw/nxagent/Drawable.c b/nx-X11/programs/Xserver/hw/nxagent/Drawable.c index 6f8ac64a6..a44818f4c 100644 --- a/nx-X11/programs/Xserver/hw/nxagent/Drawable.c +++ b/nx-X11/programs/Xserver/hw/nxagent/Drawable.c @@ -117,7 +117,7 @@ void nxagentExposeBackgroundPredicate(void *p0, XID x1, void *p2); * Imported from NXresource.c */ -extern int nxagentFindClientResource(int, RESTYPE, void *); +extern Bool nxagentFindClientResource(int, RESTYPE, void *); unsigned long nxagentGetColor(DrawablePtr pDrawable, int xPixel, int yPixel); unsigned long nxagentGetDrawableColor(DrawablePtr pDrawable); @@ -1358,12 +1358,12 @@ FIXME: All drawables should be set as synchronized and never marked as */ if (nxagentSynchronization.pDrawable != NULL && - nxagentFindClientResource(serverClient -> index, RT_NX_CORR_WINDOW, - nxagentSynchronization.pDrawable) == 0 && - nxagentFindClientResource(serverClient -> index, RT_NX_CORR_BACKGROUND, - nxagentSynchronization.pDrawable) == 0 && - nxagentFindClientResource(serverClient -> index, RT_NX_CORR_PIXMAP, - nxagentSynchronization.pDrawable) == 0) + !nxagentFindClientResource(serverClient -> index, RT_NX_CORR_WINDOW, + nxagentSynchronization.pDrawable) && + !nxagentFindClientResource(serverClient -> index, RT_NX_CORR_BACKGROUND, + nxagentSynchronization.pDrawable) && + !nxagentFindClientResource(serverClient -> index, RT_NX_CORR_PIXMAP, + nxagentSynchronization.pDrawable)) { #ifdef TEST fprintf(stderr, "nxagentSynchronizationLoop: Synchronization drawable [%p] removed from resources.\n", diff --git a/nx-X11/programs/Xserver/hw/nxagent/NXdispatch.c b/nx-X11/programs/Xserver/hw/nxagent/NXdispatch.c index e9e388886..9364dbab8 100644 --- a/nx-X11/programs/Xserver/hw/nxagent/NXdispatch.c +++ b/nx-X11/programs/Xserver/hw/nxagent/NXdispatch.c @@ -185,7 +185,7 @@ extern WindowPtr nxagentViewportFrameBelow; extern int nxagentMaxAllowedResets; -extern int nxagentFindClientResource(int, RESTYPE, void *); +extern Bool nxagentFindClientResource(int, RESTYPE, void *); #ifdef NXAGENT_CLIPBOARD extern int nxagentPrimarySelection; @@ -855,7 +855,7 @@ ProcCloseFont(register ClientPtr client) if (pFont -> refcnt > 0) { - if (nxagentFindClientResource(serverClient -> index, RT_NX_FONT, pFont) == 0) + if (!nxagentFindClientResource(serverClient -> index, RT_NX_FONT, pFont)) { #ifdef TEST fprintf(stderr, "%s: Switching resource for font at [%p].\n", __func__, @@ -955,7 +955,7 @@ ProcFreePixmap(register ClientPtr client) if (pMap -> refcnt > 0) { - if (nxagentFindClientResource(serverClient -> index, RT_NX_PIXMAP, pMap) == 0) + if (!nxagentFindClientResource(serverClient -> index, RT_NX_PIXMAP, pMap)) { #ifdef TEST fprintf(stderr, "ProcFreePixmap: Switching resource for pixmap at [%p].\n", diff --git a/nx-X11/programs/Xserver/hw/nxagent/NXresource.c b/nx-X11/programs/Xserver/hw/nxagent/NXresource.c index 53b355ff8..8442db0cb 100644 --- a/nx-X11/programs/Xserver/hw/nxagent/NXresource.c +++ b/nx-X11/programs/Xserver/hw/nxagent/NXresource.c @@ -140,7 +140,7 @@ static int nxagentResChangedFlag = 0; #endif #ifdef NXAGENT_SERVER -int nxagentFindClientResource(int client, RESTYPE type, void * value) +Bool nxagentFindClientResource(int client, RESTYPE type, void * value) { for (int i = 0; i < clientTable[client].buckets; i++) { @@ -156,12 +156,12 @@ int nxagentFindClientResource(int client, RESTYPE type, void * value) pResource -> type, client); #endif - return 1; + return True; } } } - return 0; + return False; } int nxagentSwitchResourceType(int client, RESTYPE type, void * value) |