commit 0eaa596554ff72057262c53fb47f95a4f3d05800
parent c617c3751ff65b7be847c70e8c01c1b6f26cce1f
Author: Michael Forney <mforney@mforney.org>
Date: Thu, 29 Dec 2016 20:35:21 -0800
pointer: Re-attach cursor buffer when updated
This shouldn't normally be necessary since the updated cursor buffer
will be displayed on the next scanout. However, the qemu displays seem
to require it since they can't easily detect when the buffer contents
has changed.
Diffstat:
1 file changed, 4 insertions(+), 0 deletions(-)
diff --git a/libswc/pointer.c b/libswc/pointer.c
@@ -77,6 +77,7 @@ attach(struct view *view, struct wld_buffer *buffer)
{
struct pointer *pointer = wl_container_of(view, pointer, cursor.view);
struct surface *surface = pointer->cursor.surface;
+ struct screen *screen;
if (surface && !pixman_region32_not_empty(&surface->state.damage))
return 0;
@@ -97,6 +98,9 @@ attach(struct view *view, struct wld_buffer *buffer)
if (view_set_size_from_buffer(view, buffer))
view_update_screens(view);
+ wl_list_for_each (screen, &swc.screens, link)
+ view_attach(&screen->planes.cursor.view, buffer ? pointer->cursor.buffer : NULL);
+
return 0;
}