neuwld

patched neuwld library (tracked)
git clone https://git.daat.foo/neuwld.git
Log | Files | Refs | README | LICENSE

commit 2e467a3785adfd23d113d7a982ffde578328d63a
parent 8d413279181bb54c798ed3cd772a05a74d0398da
Author: Michael Forney <mforney@mforney.org>
Date:   Wed, 15 Jan 2014 20:22:38 -0800

wayland: Report damage to server on swap

Diffstat:
Mwayland.c | 15+++++++++++++++
1 file changed, 15 insertions(+), 0 deletions(-)

diff --git a/wayland.c b/wayland.c @@ -256,6 +256,21 @@ bool buffer_socket_attach(struct wld_buffer_socket * base, wl_buffer_add_listener(wl, &socket->listener, buffer); wl_surface_attach(socket->wl, wl, 0, 0); + + if (pixman_region32_not_empty(&buffer->damage)) + { + pixman_box32_t * box; + int num_boxes; + + box = pixman_region32_rectangles(&buffer->damage, &num_boxes); + + while (num_boxes--) + { + wl_surface_damage(socket->wl, box->x1, box->y1, + box->x2 - box->x1, box->y2 - box->y1); + } + } + wl_surface_commit(socket->wl); return true;