diff --git a/include/dixstruct.h b/include/dixstruct.h index 96104275d..efa2577f8 100644 --- a/include/dixstruct.h +++ b/include/dixstruct.h @@ -98,6 +98,7 @@ typedef struct _Client { int clientGone; int noClientException; /* this client died or needs to be * killed */ + int ignoreCount; /* count for Attend/IgnoreClient */ SaveSetElt *saveSet; int numSaved; int (**requestVector) ( diff --git a/os/connection.c b/os/connection.c index cd0ca5efc..c143fb6d3 100644 --- a/os/connection.c +++ b/os/connection.c @@ -1147,6 +1147,10 @@ IgnoreClient (ClientPtr client) OsCommPtr oc = (OsCommPtr)client->osPrivate; int connection = oc->fd; + client->ignoreCount++; + if (client->ignoreCount > 1) + return; + isItTimeToYield = TRUE; if (!GrabInProgress || FD_ISSET(connection, &AllClients)) { @@ -1181,6 +1185,11 @@ AttendClient (ClientPtr client) { OsCommPtr oc = (OsCommPtr)client->osPrivate; int connection = oc->fd; + + client->ignoreCount--; + if (client->ignoreCount) + return; + if (!GrabInProgress || GrabInProgress == client->index || FD_ISSET(connection, &GrabImperviousClients)) {