diff options
author | Kristian Høgsberg <krh@bitplanet.net> | 2010-07-29 18:52:35 -0400 |
---|---|---|
committer | Kristian Høgsberg <krh@bitplanet.net> | 2010-08-06 08:28:10 -0400 |
commit | c65f610e12f9df168d5639534ed3c2bd40afffc8 (patch) | |
tree | e1443374d6b29d36f1b5dd261aeac62608863c09 | |
parent | 7e0575baf14ec4a89492fd2780f9ab5b9244afbd (diff) |
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>
-rw-r--r-- | os/connection.c | 3 | ||||
-rw-r--r-- | os/io.c | 4 |
2 files changed, 7 insertions, 0 deletions
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 @@ -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); } |