aboutsummaryrefslogtreecommitdiff
path: root/nx-X11/programs
diff options
context:
space:
mode:
authorUlrich Sibiller <uli42@gmx.de>2020-01-09 21:52:15 +0100
committerUlrich Sibiller <uli42@gmx.de>2020-01-09 21:53:38 +0100
commit33fbc6211cdc9184b1cf7a054a895dc43599afb5 (patch)
treea2d14df8dd7456f8b4d0cd712a66544df2bf59da /nx-X11/programs
parent7977b9f8f1c6b0ab9a37ce33fc53b8ef36400262 (diff)
downloadnx-libs-33fbc6211cdc9184b1cf7a054a895dc43599afb5.tar.gz
nx-libs-33fbc6211cdc9184b1cf7a054a895dc43599afb5.tar.bz2
nx-libs-33fbc6211cdc9184b1cf7a054a895dc43599afb5.zip
Pixmap.c: drop unused return code for nxagentDisconnectAllPixmaps
Diffstat (limited to 'nx-X11/programs')
-rw-r--r--nx-X11/programs/Xserver/hw/nxagent/Pixmap.c17
-rw-r--r--nx-X11/programs/Xserver/hw/nxagent/Pixmaps.h2
2 files changed, 7 insertions, 12 deletions
diff --git a/nx-X11/programs/Xserver/hw/nxagent/Pixmap.c b/nx-X11/programs/Xserver/hw/nxagent/Pixmap.c
index bb0e7302a..565394c65 100644
--- a/nx-X11/programs/Xserver/hw/nxagent/Pixmap.c
+++ b/nx-X11/programs/Xserver/hw/nxagent/Pixmap.c
@@ -647,9 +647,9 @@ void nxagentDisconnectPixmap(void *p0, XID x1, void *p2)
}
}
-Bool nxagentDisconnectAllPixmaps(void)
+void nxagentDisconnectAllPixmaps(void)
{
- int r = 1;
+ int r;
#ifdef TEST
fprintf(stderr, "nxagentDisconnectAllPixmaps: Going to iterate through pixmap resources.\n");
@@ -661,6 +661,7 @@ Bool nxagentDisconnectAllPixmaps(void)
* too.
*/
+ r = 1;
FindClientResourcesByType(clients[serverClient -> index], RT_NX_PIXMAP, nxagentDisconnectPixmap, &r);
#ifdef WARNING
@@ -674,14 +675,7 @@ Bool nxagentDisconnectAllPixmaps(void)
#endif
- /*
- * FIXME: This is a bit cumbersome:
- * - as stated below nxagentDisconnectPixmap will not modify r, so the result will stay at 1
- * - at the end of each iteration r will be set to 1 anyway.
- * So at the end of the loop r will always be 1. So the whole function will always return 1...
- */
- r = 1;
- for (int i = 0; i < MAXCLIENTS; r = 1, i++)
+ for (int i = 0; i < MAXCLIENTS; i++)
{
if (clients[i])
{
@@ -689,6 +683,7 @@ Bool nxagentDisconnectAllPixmaps(void)
fprintf(stderr, "nxagentDisconnectAllPixmaps: Going to disconnect pixmaps of client [%d].\n", i);
#endif
+ r = 1;
FindClientResourcesByType(clients[i], RT_PIXMAP, nxagentDisconnectPixmap, &r);
#ifdef WARNING
@@ -708,7 +703,7 @@ Bool nxagentDisconnectAllPixmaps(void)
fprintf(stderr, "nxagentDisconnectAllPixmaps: Pixmaps disconnection completed.\n");
#endif
- return r;
+ return;
}
void nxagentReconnectPixmap(void *p0, XID x1, void *p2)
diff --git a/nx-X11/programs/Xserver/hw/nxagent/Pixmaps.h b/nx-X11/programs/Xserver/hw/nxagent/Pixmaps.h
index 00cc39c5f..d35cd4c30 100644
--- a/nx-X11/programs/Xserver/hw/nxagent/Pixmaps.h
+++ b/nx-X11/programs/Xserver/hw/nxagent/Pixmaps.h
@@ -132,7 +132,7 @@ RegionPtr nxagentCreateRegion(DrawablePtr pDrawable, GCPtr pGC, int x, int y,
void nxagentReconnectPixmap(void *p0, XID x1, void *p2);
Bool nxagentReconnectAllPixmaps(void *p0);
void nxagentDisconnectPixmap(void *p0, XID x1, void* p2);
-Bool nxagentDisconnectAllPixmaps(void);
+void nxagentDisconnectAllPixmaps(void);
int nxagentDestroyNewPixmapResourceType(void * p, XID id);