If you need to to hook up futher state latching to the wl_surface.commit for a specific surface, use this.
Signed-off-by: Pekka Paalanen <[email protected]> --- src/compositor.c | 3 +++ src/compositor.h | 1 + 2 files changed, 4 insertions(+), 0 deletions(-) diff --git a/src/compositor.c b/src/compositor.c index f4c933e..51ad616 100644 --- a/src/compositor.c +++ b/src/compositor.c @@ -267,6 +267,7 @@ weston_surface_create(struct weston_compositor *compositor) pixman_region32_init(&surface->pending.opaque); region_init_infinite(&surface->pending.input); wl_list_init(&surface->pending.frame_callback_list); + wl_signal_init(&surface->commit_signal); return surface; } @@ -1267,6 +1268,8 @@ surface_commit(struct wl_client *client, struct wl_resource *resource) &surface->pending.frame_callback_list); wl_list_init(&surface->pending.frame_callback_list); + wl_signal_emit(&surface->commit_signal, surface); + weston_surface_schedule_repaint(surface); } diff --git a/src/compositor.h b/src/compositor.h index 4c61db7..c17c398 100644 --- a/src/compositor.h +++ b/src/compositor.h @@ -487,6 +487,7 @@ struct weston_surface { /* wl_surface.frame */ struct wl_list frame_callback_list; } pending; + struct wl_signal commit_signal; /* * If non-NULL, this function will be called on surface::attach after -- 1.7.8.6 _______________________________________________ wayland-devel mailing list [email protected] http://lists.freedesktop.org/mailman/listinfo/wayland-devel
