mirror of
https://gitlab.freedesktop.org/wayland/weston.git
synced 2025-12-20 03:30:19 +01:00
shell-utils: Ensure committed_private is set
This ensures (an unlikely) cases where get_label might be called and the callback itself would makes use committted_private to retrieve callback data. Just make sure to set it prior. Signed-off-by: Marius Vlad <marius.vlad@collabora.com>
This commit is contained in:
parent
015d73cb54
commit
7bb3a7b969
1 changed files with 4 additions and 1 deletions
|
|
@ -204,10 +204,13 @@ weston_shell_utils_curtain_create(struct weston_compositor *compositor,
|
|||
curtain->view = view;
|
||||
curtain->buffer_ref = buffer_ref;
|
||||
|
||||
weston_surface_set_label_func(surface, params->get_label);
|
||||
/* the get_label callback might depend on committed_private, so set
|
||||
* committed_private before setting the label_func so the callback is
|
||||
* always safe. */
|
||||
surface->committed = params->surface_committed;
|
||||
surface->committed_private = params->surface_private;
|
||||
|
||||
weston_surface_set_label_func(surface, params->get_label);
|
||||
weston_surface_attach_solid(surface, buffer_ref, params->width,
|
||||
params->height);
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue