compositor-wayland: Set frame callback for Pixman
authorDaniel Stone <daniels@collabora.com>
Mon, 28 Nov 2016 16:05:35 +0000 (16:05 +0000)
committerDaniel Stone <daniels@collabora.com>
Mon, 28 Nov 2016 22:00:46 +0000 (22:00 +0000)
Fixing 89c2f637b9, also set the output's frame_cb for the Pixman
renderer, not just GL. Fixes a segfault when using compositor-wayland
with --use-pixman.

Signed-off-by: Daniel Stone <daniels@collabora.com>
Reviewed-by: Dima Ryazanov <dima@gmail.com>
libweston/compositor-wayland.c

index 8f217af..60cd184 100644 (file)
@@ -593,7 +593,6 @@ wayland_output_repaint_pixman(struct weston_output *output_base,
        struct wayland_output *output = to_wayland_output(output_base);
        struct wayland_backend *b =
                to_wayland_backend(output->base.compositor);
-       struct wl_callback *callback;
        struct wayland_shm_buffer *sb;
 
        if (output->frame) {
@@ -613,8 +612,8 @@ wayland_output_repaint_pixman(struct weston_output *output_base,
 
        wayland_shm_buffer_attach(sb);
 
-       callback = wl_surface_frame(output->parent.surface);
-       wl_callback_add_listener(callback, &frame_listener, output);
+       output->frame_cb = wl_surface_frame(output->parent.surface);
+       wl_callback_add_listener(output->frame_cb, &frame_listener, output);
        wl_surface_commit(output->parent.surface);
        wl_display_flush(b->parent.wl_display);