summaryrefslogtreecommitdiff
path: root/dix
diff options
context:
space:
mode:
Diffstat (limited to 'dix')
-rw-r--r--dix/dixutils.c22
1 files changed, 22 insertions, 0 deletions
diff --git a/dix/dixutils.c b/dix/dixutils.c
index 205550eb4..b6b002385 100644
--- a/dix/dixutils.c
+++ b/dix/dixutils.c
@@ -620,6 +620,28 @@ ClientSignal(ClientPtr client)
return FALSE;
}
+int
+ClientSignalAll(ClientPtr client, ClientSleepProcPtr function, void *closure)
+{
+ SleepQueuePtr q;
+ int count = 0;
+
+ for (q = sleepQueue; q; q = q->next) {
+ if (!(client == CLIENT_SIGNAL_ANY || q->client == client))
+ continue;
+
+ if (!(function == CLIENT_SIGNAL_ANY || q->function == function))
+ continue;
+
+ if (!(closure == CLIENT_SIGNAL_ANY || q->closure == closure))
+ continue;
+
+ count += QueueWorkProc(q->function, q->client, q->closure);
+ }
+
+ return count;
+}
+
void
ClientWakeup(ClientPtr client)
{