diff options
author | Corentin Chary <corentin.chary@gmail.com> | 2011-06-10 10:24:23 +0200 |
---|---|---|
committer | Corentin Chary <corentin.chary@gmail.com> | 2011-06-10 17:36:00 +0200 |
commit | db1369a2065d9b34b5c829f515a659b48b35773d (patch) | |
tree | 3bc76f699f4ce23a7ff83673693b86b8892084fd | |
parent | d7569d46c57adb44472f52c9d1392e1b4720c4e8 (diff) |
Flush the buffer when full (patch from bnf)
Signed-off-by: Corentin Chary <corentin.chary@gmail.com>
-rw-r--r-- | wayland/connection.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/wayland/connection.c b/wayland/connection.c index e5893c3..0f2051a 100644 --- a/wayland/connection.c +++ b/wayland/connection.c @@ -327,6 +327,10 @@ void wl_connection_write(struct wl_connection *connection, const void *data, size_t count) { + if (connection->out.head - connection->out.tail + + count > ARRAY_LENGTH(connection->out.data)) + wl_connection_data(connection, WL_CONNECTION_WRITABLE); + wl_buffer_put(&connection->out, data, count); if (connection->out.head - connection->out.tail == count) |