mirror of
https://gitlab.freedesktop.org/wlroots/wlroots.git
synced 2025-11-24 06:59:45 -05:00
add role-committed hook
This commit is contained in:
parent
4d744aeb23
commit
5a18f62fee
2 changed files with 23 additions and 0 deletions
|
|
@ -428,6 +428,10 @@ static void wlr_surface_commit_pending(struct wlr_surface *surface) {
|
|||
}
|
||||
}
|
||||
|
||||
if (surface->role_committed) {
|
||||
surface->role_committed(surface, surface->role_data);
|
||||
}
|
||||
|
||||
// TODO: add the invalid bitfield to this callback
|
||||
wl_signal_emit(&surface->events.commit, surface);
|
||||
}
|
||||
|
|
@ -943,3 +947,10 @@ void wlr_surface_send_frame_done(struct wlr_surface *surface,
|
|||
wl_resource_destroy(cb->resource);
|
||||
}
|
||||
}
|
||||
|
||||
void wlr_surface_set_role_committed(struct wlr_surface *surface,
|
||||
void (*role_committed)(struct wlr_surface *surface, void *role_data),
|
||||
void *role_data) {
|
||||
surface->role_committed = role_committed;
|
||||
surface->role_data = role_data;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue