diff --git a/include/dixstruct.h b/include/dixstruct.h index 696b793ff..568ea1f59 100644 --- a/include/dixstruct.h +++ b/include/dixstruct.h @@ -99,6 +99,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; void *unused_screenPrivate[16]; diff --git a/os/connection.c b/os/connection.c index 61ba72a80..3178b7e81 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)) {