diff --git a/libweston/compositor.c b/libweston/compositor.c index eb75c5f1..8123543b 100644 --- a/libweston/compositor.c +++ b/libweston/compositor.c @@ -455,6 +455,7 @@ weston_surface_create(struct weston_compositor *compositor) return NULL; wl_signal_init(&surface->destroy_signal); + wl_signal_init(&surface->commit_signal); surface->compositor = compositor; surface->ref_count = 1; @@ -2888,6 +2889,8 @@ weston_surface_commit_state(struct weston_surface *surface, wl_list_insert_list(&surface->feedback_list, &state->feedback_list); wl_list_init(&state->feedback_list); + + wl_signal_emit(&surface->commit_signal, surface); } static void diff --git a/libweston/compositor.h b/libweston/compositor.h index 47193385..92195674 100644 --- a/libweston/compositor.h +++ b/libweston/compositor.h @@ -1015,6 +1015,7 @@ struct weston_surface { struct wl_resource *resource; struct wl_signal destroy_signal; /* callback argument: this surface */ struct weston_compositor *compositor; + struct wl_signal commit_signal; /** Damage in local coordinates from the client, for tex upload. */ pixman_region32_t damage;