From c65f610e12f9df168d5639534ed3c2bd40afffc8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Kristian=20H=C3=B8gsberg?= Date: Thu, 29 Jul 2010 18:52:35 -0400 Subject: [PATCH] Always call the flush callback chain when we flush client buffers MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit We were missing the callback in a couple of places. Drivers may use the flush callback to submit batched up rendering before events (for example, damage events) are sent out, to ensure that the rendering has been queued when the client receives the event. Signed-off-by: Kristian Høgsberg Reviewed-by: Keith Packard --- os/connection.c | 3 +++ os/io.c | 4 ++++ 2 files changed, 7 insertions(+) diff --git a/os/connection.c b/os/connection.c index c143fb6d3..77910be52 100644 --- a/os/connection.c +++ b/os/connection.c @@ -1033,6 +1033,9 @@ CloseDownConnection(ClientPtr client) { OsCommPtr oc = (OsCommPtr)client->osPrivate; + if (FlushCallback) + CallCallbacks(&FlushCallback, NULL); + if (oc->output && oc->output->count) FlushClient(client, oc, (char *)NULL, 0); #ifdef XDMCP diff --git a/os/io.c b/os/io.c index b5f98b7fa..e2df2e3ed 100644 --- a/os/io.c +++ b/os/io.c @@ -819,6 +819,10 @@ WriteToClient (ClientPtr who, int count, const void *__buf) CriticalOutputPending = FALSE; NewOutputPending = FALSE; } + + if (FlushCallback) + CallCallbacks(&FlushCallback, NULL); + return FlushClient(who, oc, buf, count); }