commit 0eaa596

Michael Forney  ·  2016-12-30 04:35:21 +0000 UTC
parent c617c37
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.
1 files changed,  +4, -0
+4, -0
 1@@ -77,6 +77,7 @@ attach(struct view *view, struct wld_buffer *buffer)
 2 {
 3 	struct pointer *pointer = wl_container_of(view, pointer, cursor.view);
 4 	struct surface *surface = pointer->cursor.surface;
 5+	struct screen *screen;
 6 
 7 	if (surface && !pixman_region32_not_empty(&surface->state.damage))
 8 		return 0;
 9@@ -97,6 +98,9 @@ attach(struct view *view, struct wld_buffer *buffer)
10 	if (view_set_size_from_buffer(view, buffer))
11 		view_update_screens(view);
12 
13+	wl_list_for_each (screen, &swc.screens, link)
14+		view_attach(&screen->planes.cursor.view, buffer ? pointer->cursor.buffer : NULL);
15+
16 	return 0;
17 }
18