scene_descriptor: Add scene_descriptor_reassign

Same as the assign variant, but lets us mutate an existing descriptor
if it exists instead of asserting.
This commit is contained in:
Alexander Orzechowski 2024-08-26 15:46:55 -04:00
parent b6cae6fc72
commit bd8f12915f
2 changed files with 14 additions and 0 deletions

View file

@ -32,6 +32,9 @@ enum sway_scene_descriptor_type {
bool scene_descriptor_assign(struct wlr_scene_node *node,
enum sway_scene_descriptor_type type, void *data);
bool scene_descriptor_reassign(struct wlr_scene_node *node,
enum sway_scene_descriptor_type type, void *data);
void *scene_descriptor_try_get(struct wlr_scene_node *node,
enum sway_scene_descriptor_type type);