aboutsummaryrefslogtreecommitdiff
path: root/nx-X11/programs/Xserver
diff options
context:
space:
mode:
authorUlrich Sibiller <uli42@gmx.de>2019-10-22 22:36:13 +0200
committerUlrich Sibiller <uli42@gmx.de>2020-01-05 22:37:35 +0100
commitfae611c91be11511a673ce99513099b4e70ff3d9 (patch)
tree8c63f6c3fff761cf7c51f06752bb376ac833c402 /nx-X11/programs/Xserver
parentbbb23e586f9739be4ffe9a9c9dc2373fe326daa2 (diff)
downloadnx-libs-fae611c91be11511a673ce99513099b4e70ff3d9.tar.gz
nx-libs-fae611c91be11511a673ce99513099b4e70ff3d9.tar.bz2
nx-libs-fae611c91be11511a673ce99513099b4e70ff3d9.zip
Client.c: save some lines
Diffstat (limited to 'nx-X11/programs/Xserver')
-rw-r--r--nx-X11/programs/Xserver/hw/nxagent/Client.c71
1 files changed, 28 insertions, 43 deletions
diff --git a/nx-X11/programs/Xserver/hw/nxagent/Client.c b/nx-X11/programs/Xserver/hw/nxagent/Client.c
index 6ea0c4fcf..6568859d1 100644
--- a/nx-X11/programs/Xserver/hw/nxagent/Client.c
+++ b/nx-X11/programs/Xserver/hw/nxagent/Client.c
@@ -54,8 +54,7 @@
#include "Utils.h"
/*
- * Need to include this after the stub
- * definition of GC in Agent.h.
+ * Need to include this after the stub definition of GC in Agent.h.
*/
#include "compext/Compext.h"
@@ -70,22 +69,20 @@
#undef DEBUG
/*
- * Returns the last signal delivered
- * to the process.
+ * Returns the last signal delivered to the process.
*/
extern int _X11TransSocketCheckSignal(void);
/*
- * Time in milliseconds of first iteration
- * through the dispatcher.
+ * Time in milliseconds of first iteration through the dispatcher.
*/
unsigned long nxagentStartTime = -1;
/*
- * If defined, add a function checking if we
- * need a null timeout after a client wakeup.
+ * If defined, add a function checking if we need a null timeout after
+ * a client wakeup.
*/
#undef CHECK_RESTARTED_CLIENTS
@@ -103,8 +100,8 @@ void nxagentCheckRestartedClients(struct timeval **timeout);
int nxagentClientPrivateIndex;
/*
- * The master nxagent holds in nxagentShadowCounter
- * the number of shadow nxagents connected to itself.
+ * The master nxagent holds in nxagentShadowCounter the number of
+ * shadow nxagents connected to itself.
*/
int nxagentShadowCounter = 0;
@@ -120,8 +117,8 @@ void nxagentInitClientPrivates(ClientPtr client)
}
/*
- * Guess the running application based on the
- * properties attached to its main window.
+ * Guess the running application based on the properties attached to
+ * its main window.
*/
void nxagentGuessClientHint(ClientPtr client, Atom property, char *data)
@@ -199,8 +196,8 @@ void nxagentGuessShadowHint(ClientPtr client, Atom property)
#endif
/*
- * From this moment on we ignore the visibility
- * checks to keep the windows updated.
+ * From this moment on we ignore the visibility checks to keep
+ * the windows updated.
*/
nxagentChangeOption(IgnoreVisibility, 1);
@@ -210,7 +207,6 @@ void nxagentGuessShadowHint(ClientPtr client, Atom property)
void nxagentCheckIfShadowAgent(ClientPtr client)
{
-
if (nxagentClientPriv(client) -> clientHint == NXAGENT_SHADOW)
{
#ifdef TEST
@@ -234,14 +230,11 @@ void nxagentCheckIfShadowAgent(ClientPtr client)
nxagentShadowCounter);
#endif
-
if (nxagentShadowCounter == 0)
{
/*
- * The last shadow nxagent has been detached
- * from master nxagent.
- * The master nxagent could do some action
- * here.
+ * The last shadow nxagent has been detached from master
+ * nxagent. The master nxagent could do some action here.
*/
#ifdef TEST
@@ -255,13 +248,11 @@ void nxagentCheckIfShadowAgent(ClientPtr client)
void nxagentWakeupByReconnect(void)
{
- int i;
-
#ifdef TEST
fprintf(stderr, "++++++nxagentWakeupByReconnect: Going to wakeup all clients.\n");
#endif
- for (i = 1; i < currentMaxClients; i++)
+ for (int i = 1; i < currentMaxClients; i++)
{
if (clients[i] != NULL)
{
@@ -343,8 +334,7 @@ void nxagentWaitWakeupBySplit(ClientPtr client)
#endif
/*
- * Be sure we intercept an I/O error
- * as well as an interrupt.
+ * Be sure we intercept an I/O error as well as an interrupt.
*/
#ifdef USE_FINISH_SPLIT
@@ -358,11 +348,9 @@ void nxagentWaitWakeupBySplit(ClientPtr client)
for (;;)
{
/*
- * Can we handle all the possible events here
- * or we need to select only the split events?
- * Handling all the possible events would pre-
- * empt the queue and make a better use of the
- * link.
+ * Can we handle all the possible events here or we need to select
+ * only the split events? Handling all the possible events would
+ * preempt the queue and make a better use of the link.
*/
#ifdef WAIT_ALL_EVENTS
@@ -407,9 +395,9 @@ void nxagentWaitWakeupBySplit(ClientPtr client)
int nxagentSuspendBySplit(ClientPtr client)
{
/*
-FIXME: Should record a serial number for the client, so that
- the client is not restarted because of an end of split
- of a previous client with the same index.
+FIXME: Should record a serial number for the client, so that the
+ client is not restarted because of an end of split of a
+ previous client with the same index.
*/
if (client -> index < MAX_CONNECTIONS)
{
@@ -453,9 +441,9 @@ FIXME: Should record a serial number for the client, so that
int nxagentWakeupBySplit(ClientPtr client)
{
/*
-FIXME: Should record a serial number for the client, so that
- the client is not restarted because of the end of the
- split for a previous client with the same index.
+FIXME: Should record a serial number for the client, so that the
+ client is not restarted because of the end of the split for a
+ previous client with the same index.
*/
if (client -> index < MAX_CONNECTIONS)
{
@@ -498,16 +486,13 @@ void nxagentCheckRestartedClients(struct timeval **timeout)
{
static struct timeval zero;
- int i;
-
/*
- * If any of the restarted clients had requests
- * in input we'll need to enter the select with
- * a null timeout, or we will block until any
- * other client becomes available.
+ * If any of the restarted clients had requests in input we'll need
+ * to enter the select with a null timeout, or we will block until
+ * any other client becomes available.
*/
- for (i = 1; i < currentMaxClients; i++)
+ for (int i = 1; i < currentMaxClients; i++)
{
if (clients[i] != NULL && clients[i] -> osPrivate != NULL &&
nxagentNeedWakeup(clients[i]) == 0)