compositor: add wlr_surface_role.client_commit

This commit is contained in:
Simon Ser 2023-12-10 15:32:23 +01:00
parent d847516765
commit 7e1ae5548c
2 changed files with 14 additions and 0 deletions

View file

@ -565,6 +565,11 @@ static void surface_handle_commit(struct wl_client *client,
struct wlr_surface *surface = wlr_surface_from_resource(resource);
surface_finalize_pending(surface);
if (surface->role != NULL && surface->role->client_commit != NULL &&
(surface->role_resource != NULL || surface->role->no_object)) {
surface->role->client_commit(surface);
}
wl_signal_emit_mutable(&surface->events.client_commit, NULL);
if (surface->pending.cached_state_locks > 0 || !wl_list_empty(&surface->cached)) {