Always call the flush callback chain when we flush client buffers

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 <krh@bitplanet.net>
Reviewed-by: Keith Packard <keithp@keithp.com>
This commit is contained in:
Kristian Høgsberg 2010-07-29 18:52:35 -04:00
parent 7e0575baf1
commit c65f610e12
2 changed files with 7 additions and 0 deletions

View File

@ -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

View File

@ -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);
}