Merge branch 'rename_commit_signal' into 'main'

Draft: tree-wide: Rename committed handlers

See merge request wayland/weston!2059
This commit is contained in:
Derek Foreman 2026-05-01 08:17:03 -05:00
commit 9d2f637b99
32 changed files with 270 additions and 271 deletions

View file

@ -181,10 +181,10 @@ update_input_panels(struct wl_listener *listener, void *data)
}
static void
input_panel_committed(struct weston_surface *surface,
struct weston_coord_surface new_origin)
input_panel_updated(struct weston_surface *surface,
struct weston_coord_surface new_origin)
{
struct input_panel_surface *ip_surface = surface->committed_private;
struct input_panel_surface *ip_surface = surface->updated_private;
struct desktop_shell *shell = ip_surface->shell;
if (!weston_surface_has_content(surface))
@ -207,7 +207,7 @@ destroy_input_panel_surface(struct input_panel_surface *input_panel_surface)
wl_list_remove(&input_panel_surface->surface_destroy_listener.link);
wl_list_remove(&input_panel_surface->link);
input_panel_surface->surface->committed = NULL;
input_panel_surface->surface->updated = NULL;
weston_surface_set_label(input_panel_surface->surface, NULL);
weston_view_destroy(input_panel_surface->view);
@ -217,8 +217,8 @@ destroy_input_panel_surface(struct input_panel_surface *input_panel_surface)
static struct input_panel_surface *
get_input_panel_surface(struct weston_surface *surface)
{
if (surface->committed == input_panel_committed) {
return surface->committed_private;
if (surface->updated == input_panel_updated) {
return surface->updated_private;
} else {
return NULL;
}
@ -248,8 +248,8 @@ create_input_panel_surface(struct desktop_shell *shell,
if (!input_panel_surface)
return NULL;
surface->committed = input_panel_committed;
surface->committed_private = input_panel_surface;
surface->updated = input_panel_updated;
surface->updated_private = input_panel_surface;
weston_surface_set_label_static(surface, "input panel");
input_panel_surface->shell = shell;
@ -337,7 +337,7 @@ input_panel_get_input_panel_surface(struct wl_client *client,
if (!ipsurf) {
wl_resource_post_error(surface_resource,
WL_DISPLAY_ERROR_INVALID_OBJECT,
"surface->committed already set");
"surface->updated already set");
return;
}

View file

@ -400,15 +400,15 @@ shell_configuration(struct desktop_shell *shell)
/* no-op func for checking focus surface */
static void
focus_surface_committed(struct weston_surface *es,
struct weston_coord_surface new_origin)
focus_surface_updated(struct weston_surface *es,
struct weston_coord_surface new_origin)
{
}
static bool
is_focus_view (struct weston_view *view)
{
return (view->surface->committed == focus_surface_committed);
return (view->surface->updated == focus_surface_updated);
}
static struct focus_surface *
@ -420,7 +420,7 @@ create_focus_surface(struct weston_compositor *ec,
.r = 0.0, .g = 0.0, .b = 0.0, .a = 1.0,
.pos = output->pos,
.width = output->width, .height = output->height,
.surface_committed = focus_surface_committed,
.surface_updated = focus_surface_updated,
.surface_private = NULL,
.capture_input = false,
};
@ -1655,8 +1655,8 @@ shell_surface_get_shell(struct shell_surface *shsurf)
}
static void
black_surface_committed(struct weston_surface *es,
struct weston_coord_surface new_origin)
black_surface_updated(struct weston_surface *es,
struct weston_coord_surface new_origin)
{
}
@ -1665,9 +1665,9 @@ is_black_surface_view(struct weston_view *view, struct weston_view **fs_view)
{
struct weston_surface *surface = view->surface;
if (surface->committed == black_surface_committed) {
if (surface->updated == black_surface_updated) {
if (fs_view)
*fs_view = surface->committed_private;
*fs_view = surface->updated_private;
return true;
}
return false;
@ -1692,7 +1692,7 @@ shell_set_view_fullscreen(struct shell_surface *shsurf)
.r = 0.0, .g = 0.0, .b = 0.0, .a = 1.0,
.pos = output->pos,
.width = output->width, .height = output->height,
.surface_committed = black_surface_committed,
.surface_updated = black_surface_updated,
.surface_private = shsurf->view,
.capture_input = true,
};
@ -2144,8 +2144,8 @@ map(struct desktop_shell *shell, struct shell_surface *shsurf)
}
static void
desktop_surface_committed(struct weston_desktop_surface *desktop_surface,
struct weston_coord_surface buf_offset, void *data)
desktop_surface_updated(struct weston_desktop_surface *desktop_surface,
struct weston_coord_surface buf_offset, void *data)
{
struct shell_surface *shsurf =
weston_desktop_surface_get_user_data(desktop_surface);
@ -2600,7 +2600,7 @@ static const struct weston_desktop_api shell_desktop_api = {
.struct_size = sizeof(struct weston_desktop_api),
.surface_added = desktop_surface_added,
.surface_removed = desktop_surface_removed,
.committed = desktop_surface_committed,
.updated = desktop_surface_updated,
.move = desktop_surface_move,
.resize = desktop_surface_resize,
.set_parent = desktop_surface_set_parent,
@ -2618,13 +2618,13 @@ static const struct weston_desktop_api shell_desktop_api = {
* ************************ */
static void
background_committed(struct weston_surface *es,
struct weston_coord_surface new_origin)
background_updated(struct weston_surface *es,
struct weston_coord_surface new_origin)
{
struct shell_output *sh_output = es->committed_private;
struct shell_output *sh_output = es->updated_private;
struct desktop_shell *shell;
/* The output was destroyed before the background was committed */
/* The output was destroyed before the background was updated */
if (!sh_output)
return;
@ -2670,7 +2670,7 @@ desktop_shell_set_background(struct wl_client *client,
struct weston_head *head = weston_head_from_resource(output_resource);
char *label;
if (surface->committed) {
if (surface->updated) {
wl_resource_post_error(surface_resource,
WL_DISPLAY_ERROR_INVALID_OBJECT,
"surface role already assigned");
@ -2689,8 +2689,8 @@ desktop_shell_set_background(struct wl_client *client,
return;
}
surface->committed = background_committed;
surface->committed_private = sh_output;
surface->updated = background_updated;
surface->updated_private = sh_output;
str_printf(&label, "background for output %s", surface->output->name);
weston_surface_set_label(surface, label);
@ -2709,15 +2709,15 @@ desktop_shell_set_background(struct wl_client *client,
}
static void
panel_committed(struct weston_surface *es,
struct weston_coord_surface new_origin)
panel_updated(struct weston_surface *es,
struct weston_coord_surface new_origin)
{
struct shell_output *sh_output = es->committed_private;
struct shell_output *sh_output = es->updated_private;
struct weston_output *output;
struct weston_coord_global pos;
struct desktop_shell *shell;
/* The output was destroyed before the panel was committed */
/* The output was destroyed before the panel was updated */
if (!sh_output)
return;
@ -2784,7 +2784,7 @@ desktop_shell_set_panel(struct wl_client *client,
struct weston_head *head = weston_head_from_resource(output_resource);
char *label;
if (surface->committed) {
if (surface->updated) {
wl_resource_post_error(surface_resource,
WL_DISPLAY_ERROR_INVALID_OBJECT,
"surface role already assigned");
@ -2804,8 +2804,8 @@ desktop_shell_set_panel(struct wl_client *client,
return;
}
surface->committed = panel_committed;
surface->committed_private = sh_output;
surface->updated = panel_updated;
surface->updated_private = sh_output;
str_printf(&label, "panel for output %s", surface->output->name);
weston_surface_set_label(surface, label);
@ -2822,10 +2822,10 @@ desktop_shell_set_panel(struct wl_client *client,
}
static void
lock_surface_committed(struct weston_surface *surface,
struct weston_coord_surface new_origin)
lock_surface_updated(struct weston_surface *surface,
struct weston_coord_surface new_origin)
{
struct desktop_shell *shell = surface->committed_private;
struct desktop_shell *shell = surface->updated_private;
if (!weston_surface_has_content(surface))
return;
@ -2875,8 +2875,8 @@ desktop_shell_set_lock_surface(struct wl_client *client,
return;
}
surface->committed = lock_surface_committed;
surface->committed_private = shell;
surface->updated = lock_surface_updated;
surface->updated_private = shell;
weston_surface_set_label_static(surface, "lock window");
shell->lock_surface = surface;
@ -3681,7 +3681,7 @@ shell_fade_create_view(struct desktop_shell *shell)
struct shell_output *shell_output;
struct weston_curtain_params curtain_params = {
.r = 0.0, .g = 0.0, .b = 0.0, .a = 1.0,
.surface_committed = black_surface_committed,
.surface_updated = black_surface_updated,
.surface_private = shell,
.capture_input = true,
.label = xstrdup("desktop shell fade surface"),
@ -4404,11 +4404,11 @@ shell_output_destroy(struct shell_output *shell_output)
if (shell_output->panel_surface) {
wl_list_remove(&shell_output->panel_surface_listener.link);
shell_output->panel_surface->committed_private = NULL;
shell_output->panel_surface->updated_private = NULL;
}
if (shell_output->background_surface) {
wl_list_remove(&shell_output->background_surface_listener.link);
shell_output->background_surface->committed_private = NULL;
shell_output->background_surface->updated_private = NULL;
}
wl_list_remove(&shell_output->destroy_listener.link);
wl_list_remove(&shell_output->link);

View file

@ -66,7 +66,7 @@ struct focus_state {
*
* A surfaces layer is modified on configuring the surface, in
* set_surface_type() (which is only called when the surfaces type change is
* _committed_). If a surfaces type changes (e.g. when making a window
* _applied_). If a surfaces type changes (e.g. when making a window
* fullscreen) its layer changes too.
*
* In order to allow popup and transient surfaces to be correctly stacked above

View file

@ -67,8 +67,8 @@ struct weston_desktop_api {
void *user_data);
void (*surface_removed)(struct weston_desktop_surface *surface,
void *user_data);
void (*committed)(struct weston_desktop_surface *surface,
struct weston_coord_surface buf_offset, void *user_data);
void (*updated)(struct weston_desktop_surface *surface,
struct weston_coord_surface buf_offset, void *user_data);
void (*show_window_menu)(struct weston_desktop_surface *surface,
struct weston_seat *seat,
struct weston_coord_surface offset,
@ -101,7 +101,7 @@ struct weston_desktop_api {
* e.g. via the commonly used '-geometry' command line option. In such
* case, a call to surface_added() is immediately followed by
* xwayland_position() if the X11 application specified a position.
* The committed() call that will map the window occurs later, so it
* The updated() call that will map the window occurs later, so it
* is recommended to usually store and honour the given position for
* windows that are not yet mapped.
*

View file

@ -1906,7 +1906,7 @@ struct weston_pointer_constraint {
struct wl_listener pointer_destroy_listener;
struct wl_listener view_unmap_listener;
struct wl_listener surface_commit_listener;
struct wl_listener surface_update_listener;
struct wl_listener surface_activate_listener;
};
@ -1919,7 +1919,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;
struct wl_signal content_update_signal;
/* struct weston_paint_node::surface_link */
struct wl_list paint_node_list;
@ -1978,14 +1978,14 @@ struct weston_surface {
struct weston_matrix surface_to_buffer_matrix;
/*
* If non-NULL, this function will be called on
* wl_surface::commit after a new buffer has been set up for
* If non-NULL, this function will be called on during content
* update application after a new buffer has been set up for
* this surface. The coordinate holds the buffer offset parameters
* supplied to wl_surface::attach or wl_surface::offset.
*/
void (*committed)(struct weston_surface *es,
struct weston_coord_surface new_origin);
void *committed_private;
void (*updated)(struct weston_surface *es,
struct weston_coord_surface new_origin);
void *updated_private;
/** human-readable, non-unique label */
const char *label;

View file

@ -32,8 +32,8 @@ extern "C" {
/* parameter for weston_curtain_create() */
struct weston_curtain_params {
char *label;
void (*surface_committed)(struct weston_surface *es,
struct weston_coord_surface new_origin);
void (*surface_updated)(struct weston_surface *es,
struct weston_coord_surface new_origin);
void *surface_private;
float r, g, b, a;
struct weston_coord_global pos;

View file

@ -481,7 +481,7 @@ struct ivi_layout_interface {
/**
* \brief Add a ivi_surface to a ivi_layer which is currently managed by the service
*
* The surface buffer must be committed before the ivi-controller adds
* The surface buffer must be applied before the ivi-controller adds
* the ivi_surface to a ivi_layer
*/
void (*layer_add_surface)(struct ivi_layout_layer *ivilayer,

View file

@ -112,7 +112,7 @@ struct ivi_shell_seat {
*/
static void
ivi_shell_surface_committed(struct weston_surface *, struct weston_coord_surface);
ivi_shell_surface_updated(struct weston_surface *, struct weston_coord_surface);
static struct ivi_shell_surface *
get_ivi_shell_surface(struct weston_surface *surface)
@ -122,8 +122,8 @@ get_ivi_shell_surface(struct weston_surface *surface)
if (desktop_surface)
return weston_desktop_surface_get_user_data(desktop_surface);
if (surface->committed == ivi_shell_surface_committed)
return surface->committed_private;
if (surface->updated == ivi_shell_surface_updated)
return surface->updated_private;
return NULL;
}
@ -191,8 +191,8 @@ shell_surface_send_configure(struct weston_surface *surface,
}
static void
ivi_shell_surface_committed(struct weston_surface *surface,
struct weston_coord_surface new_origin)
ivi_shell_surface_updated(struct weston_surface *surface,
struct weston_coord_surface new_origin)
{
struct ivi_shell_surface *ivisurf = get_ivi_shell_surface(surface);
@ -230,8 +230,8 @@ layout_surface_cleanup(struct ivi_shell_surface *ivisurf)
ivi_layout_surface_destroy(ivisurf->layout_surface);
ivisurf->layout_surface = NULL;
ivisurf->surface->committed = NULL;
ivisurf->surface->committed_private = NULL;
ivisurf->surface->updated = NULL;
ivisurf->surface->updated_private = NULL;
weston_surface_set_label(ivisurf->surface, NULL);
ivisurf->surface = NULL;
}
@ -365,8 +365,8 @@ application_surface_create(struct wl_client *client,
ivisurf->surface = weston_surface;
weston_surface->committed = ivi_shell_surface_committed;
weston_surface->committed_private = ivisurf;
weston_surface->updated = ivi_shell_surface_updated;
weston_surface->updated_private = ivisurf;
str_printf(&label, "ivi-surface %u", ivisurf->id_surface);
weston_surface_set_label(weston_surface, label);
@ -707,8 +707,8 @@ desktop_surface_removed(struct weston_desktop_surface *surface,
}
static void
desktop_surface_committed(struct weston_desktop_surface *surface,
struct weston_coord_surface buf_offset, void *user_data)
desktop_surface_updated(struct weston_desktop_surface *surface,
struct weston_coord_surface buf_offset, void *user_data)
{
struct ivi_shell_surface *ivisurf = (struct ivi_shell_surface *)
weston_desktop_surface_get_user_data(surface);
@ -802,7 +802,7 @@ static const struct weston_desktop_api shell_desktop_api = {
.pong = desktop_surface_pong,
.surface_added = desktop_surface_added,
.surface_removed = desktop_surface_removed,
.committed = desktop_surface_committed,
.updated = desktop_surface_updated,
.move = desktop_surface_move,
.resize = desktop_surface_resize,
@ -890,10 +890,10 @@ update_input_panels(struct wl_listener *listener, void *data)
}
static void
input_panel_committed(struct weston_surface *surface,
struct weston_coord_surface new_origin)
input_panel_updated(struct weston_surface *surface,
struct weston_coord_surface new_origin)
{
struct ivi_input_panel_surface *ipsurf = surface->committed_private;
struct ivi_input_panel_surface *ipsurf = surface->updated_private;
struct ivi_shell *shell = ipsurf->shell;
if (surface->width == 0 || surface->height == 0)
@ -915,14 +915,14 @@ input_panel_committed(struct weston_surface *surface,
bool
shell_is_input_panel_surface(struct weston_surface *surface)
{
return surface->committed == input_panel_committed;
return surface->updated == input_panel_updated;
}
static struct ivi_input_panel_surface *
get_input_panel_surface(struct weston_surface *surface)
{
if (shell_is_input_panel_surface(surface))
return surface->committed_private;
return surface->updated_private;
else
return NULL;
}
@ -948,8 +948,8 @@ create_input_panel_surface(struct ivi_shell *shell,
ipsurf = xzalloc(sizeof *ipsurf);
surface->committed = input_panel_committed;
surface->committed_private = ipsurf;
surface->updated = input_panel_updated;
surface->updated_private = ipsurf;
weston_surface_set_label_static(surface, "input panel");
wl_list_init(&ipsurf->link);
@ -1021,8 +1021,8 @@ destroy_input_panel_surface_resource(struct wl_resource *resource)
ivi_layout_surface_destroy(ipsurf->layout_surface);
ipsurf->layout_surface = NULL;
ipsurf->surface->committed = NULL;
ipsurf->surface->committed_private = NULL;
ipsurf->surface->updated = NULL;
ipsurf->surface->updated_private = NULL;
weston_surface_set_label(ipsurf->surface, NULL);
ipsurf->surface = NULL;
@ -1054,7 +1054,7 @@ input_panel_get_input_panel_surface(struct wl_client *client,
if (!ipsurf) {
wl_resource_post_error(surface_resource,
WL_DISPLAY_ERROR_INVALID_OBJECT,
"surface->committed already set");
"surface->updated already set");
return;
}

View file

@ -727,7 +727,7 @@ kiosk_shell_output_recreate_background(struct kiosk_shell_output *shoutput)
curtain_params.capture_input = true;
curtain_params.label = xstrdup("kiosk shell background surface");
curtain_params.surface_committed = NULL;
curtain_params.surface_updated = NULL;
curtain_params.surface_private = NULL;
shoutput->curtain = weston_shell_utils_curtain_create(ec, &curtain_params);
@ -986,8 +986,8 @@ desktop_surface_removed(struct weston_desktop_surface *desktop_surface,
}
static void
desktop_surface_committed(struct weston_desktop_surface *desktop_surface,
struct weston_coord_surface buf_offset, void *data)
desktop_surface_updated(struct weston_desktop_surface *desktop_surface,
struct weston_coord_surface buf_offset, void *data)
{
struct kiosk_shell_surface *shsurf =
weston_desktop_surface_get_user_data(desktop_surface);
@ -1021,7 +1021,7 @@ desktop_surface_committed(struct weston_desktop_surface *desktop_surface,
shsurf->appid_output_assigned = true;
}
/* TODO: When the top-level surface is committed with a new size after an
/* TODO: When the top-level surface is updated with a new size after an
* output resize, sometimes the view appears scaled. What state are we not
* updating?
*/
@ -1230,7 +1230,7 @@ static const struct weston_desktop_api kiosk_shell_desktop_api = {
.struct_size = sizeof(struct weston_desktop_api),
.surface_added = desktop_surface_added,
.surface_removed = desktop_surface_removed,
.committed = desktop_surface_committed,
.updated = desktop_surface_updated,
.move = desktop_surface_move,
.resize = desktop_surface_resize,
.set_parent = desktop_surface_set_parent,

View file

@ -113,8 +113,8 @@ static char *
weston_output_create_heads_string(struct weston_output *output);
static void
subsurface_committed(struct weston_surface *surface,
struct weston_coord_surface new_origin);
subsurface_updated(struct weston_surface *surface,
struct weston_coord_surface new_origin);
static bool
weston_view_is_fully_blended(struct weston_view *ev,
@ -997,7 +997,7 @@ weston_surface_create(struct weston_compositor *compositor,
return NULL;
wl_signal_init(&surface->destroy_signal);
wl_signal_init(&surface->commit_signal);
wl_signal_init(&surface->content_update_signal);
wl_signal_init(&surface->map_signal);
wl_signal_init(&surface->unmap_signal);
@ -2125,7 +2125,7 @@ WL_EXPORT void
weston_view_set_position(struct weston_view *view,
struct weston_coord_global pos)
{
assert(view->surface->committed != subsurface_committed);
assert(view->surface->updated != subsurface_updated);
assert(!view->geometry.parent);
if (view->geometry.pos_offset.x == pos.c.x &&
@ -2146,7 +2146,7 @@ weston_view_set_position_with_offset(struct weston_view *view,
struct weston_coord_surface origin_s;
struct weston_coord_global origin_g, newpos;
assert(view->surface->committed != subsurface_committed);
assert(view->surface->updated != subsurface_updated);
assert(!view->geometry.parent);
/* We need up to date transform matrices */
@ -2181,7 +2181,7 @@ weston_view_get_pos_offset_global(struct weston_view *view)
{
struct weston_coord_global out;
assert(view->surface->committed != subsurface_committed);
assert(view->surface->updated != subsurface_updated);
assert(!view->geometry.parent);
out.c = view->geometry.pos_offset;
@ -5379,8 +5379,8 @@ static const struct wl_compositor_interface compositor_interface = {
};
static void
subsurface_committed(struct weston_surface *surface,
struct weston_coord_surface new_origin)
subsurface_updated(struct weston_surface *surface,
struct weston_coord_surface new_origin)
{
struct weston_view *view;
@ -5427,8 +5427,8 @@ subsurface_committed(struct weston_surface *surface,
struct weston_subsurface *
weston_surface_to_subsurface(struct weston_surface *surface)
{
if (surface->committed == subsurface_committed)
return surface->committed_private;
if (surface->updated == subsurface_updated)
return surface->updated_private;
return NULL;
}
@ -5892,8 +5892,8 @@ weston_subsurface_destroy(struct weston_subsurface *sub)
weston_surface_state_fini(&sub->cached);
sub->surface->committed = NULL;
sub->surface->committed_private = NULL;
sub->surface->updated = NULL;
sub->surface->updated_private = NULL;
weston_surface_set_label(sub->surface, NULL);
} else {
/* the dummy weston_subsurface for the parent itself */
@ -6024,8 +6024,8 @@ subcompositor_get_subsurface(struct wl_client *client,
return;
}
surface->committed = subsurface_committed;
surface->committed_private = sub;
surface->updated = subsurface_updated;
surface->updated_private = sub;
weston_surface_set_label_static(surface, "sub-surface");
}

View file

@ -446,25 +446,25 @@ drag_surface_configure(struct weston_drag *drag,
}
static void
pointer_drag_surface_committed(struct weston_surface *es,
struct weston_coord_surface new_origin)
pointer_drag_surface_updated(struct weston_surface *es,
struct weston_coord_surface new_origin)
{
struct weston_pointer_drag *drag = es->committed_private;
struct weston_pointer_drag *drag = es->updated_private;
struct weston_pointer *pointer = drag->grab.pointer;
assert(es->committed == pointer_drag_surface_committed);
assert(es->updated == pointer_drag_surface_updated);
drag_surface_configure(&drag->base, pointer, NULL, es, new_origin);
}
static void
touch_drag_surface_committed(struct weston_surface *es,
struct weston_coord_surface new_origin)
touch_drag_surface_updated(struct weston_surface *es,
struct weston_coord_surface new_origin)
{
struct weston_touch_drag *drag = es->committed_private;
struct weston_touch_drag *drag = es->updated_private;
struct weston_touch *touch = drag->grab.touch;
assert(es->committed == touch_drag_surface_committed);
assert(es->updated == touch_drag_surface_updated);
drag_surface_configure(&drag->base, NULL, touch, es, new_origin);
}
@ -628,7 +628,7 @@ data_device_end_drag_grab(struct weston_drag *drag,
if (weston_view_is_mapped(drag->icon))
weston_view_unmap(drag->icon);
drag->icon->surface->committed = NULL;
drag->icon->surface->updated = NULL;
weston_surface_set_label(drag->icon->surface, NULL);
pixman_region32_clear(&drag->icon->surface->pending.input);
wl_list_remove(&drag->icon_destroy_listener.link);
@ -939,8 +939,8 @@ weston_pointer_start_drag(struct weston_pointer *pointer,
wl_signal_add(&icon->destroy_signal,
&drag->base.icon_destroy_listener);
icon->committed = pointer_drag_surface_committed;
icon->committed_private = drag;
icon->updated = pointer_drag_surface_updated;
icon->updated_private = drag;
weston_surface_set_label_static(icon, "pointer drag icon");
drag->base.offset = weston_coord_surface(0, 0, icon);
} else {
@ -1002,8 +1002,8 @@ weston_touch_start_drag(struct weston_touch *touch,
wl_signal_add(&icon->destroy_signal,
&drag->base.icon_destroy_listener);
icon->committed = touch_drag_surface_committed;
icon->committed_private = drag;
icon->updated = touch_drag_surface_updated;
icon->updated_private = drag;
weston_surface_set_label_static(icon, "touch drag icon");
drag->base.offset = weston_coord_surface(0, 0, icon);
} else {

View file

@ -47,9 +47,9 @@ void
weston_desktop_api_surface_removed(struct weston_desktop *desktop,
struct weston_desktop_surface *surface);
void
weston_desktop_api_committed(struct weston_desktop *desktop,
struct weston_desktop_surface *surface,
struct weston_coord_surface buf_offset);
weston_desktop_api_updated(struct weston_desktop *desktop,
struct weston_desktop_surface *surface,
struct weston_coord_surface buf_offset);
void
weston_desktop_api_show_window_menu(struct weston_desktop *desktop,
struct weston_desktop_surface *surface,
@ -107,8 +107,8 @@ struct weston_desktop_surface_implementation {
void *user_data, int32_t width, int32_t height);
void (*set_orientation)(struct weston_desktop_surface *surface,
void *user_data, enum weston_top_level_tiled_orientation tiled_orientation);
void (*committed)(struct weston_desktop_surface *surface, void *user_data,
struct weston_coord_surface buf_offset);
void (*updated)(struct weston_desktop_surface *surface, void *user_data,
struct weston_coord_surface buf_offset);
void (*update_position)(struct weston_desktop_surface *surface,
void *user_data);
void (*ping)(struct weston_desktop_surface *surface, uint32_t serial,

View file

@ -151,12 +151,12 @@ weston_desktop_api_surface_removed(struct weston_desktop *desktop,
}
void
weston_desktop_api_committed(struct weston_desktop *desktop,
struct weston_desktop_surface *surface,
struct weston_coord_surface buf_offset)
weston_desktop_api_updated(struct weston_desktop *desktop,
struct weston_desktop_surface *surface,
struct weston_coord_surface buf_offset)
{
if (desktop->api.committed != NULL)
desktop->api.committed(surface, buf_offset, desktop->user_data);
if (desktop->api.updated != NULL)
desktop->api.updated(surface, buf_offset, desktop->user_data);
}
void

View file

@ -54,7 +54,7 @@ struct weston_desktop_surface {
struct weston_surface *surface;
struct wl_list view_list;
struct weston_coord_surface buffer_move;
struct wl_listener surface_commit_listener;
struct wl_listener surface_update_listener;
struct wl_listener surface_destroy_listener;
struct wl_listener client_destroy_listener;
struct wl_list children_list;
@ -148,7 +148,7 @@ weston_desktop_surface_destroy(struct weston_desktop_surface *surface)
struct weston_desktop_view *view, *next_view;
struct weston_desktop_surface *child, *next_child;
wl_list_remove(&surface->surface_commit_listener.link);
wl_list_remove(&surface->surface_update_listener.link);
wl_list_remove(&surface->surface_destroy_listener.link);
wl_list_remove(&surface->client_destroy_listener.link);
@ -162,8 +162,8 @@ weston_desktop_surface_destroy(struct weston_desktop_surface *surface)
surface->implementation->destroy(surface, surface->implementation_data);
surface->surface->committed = NULL;
surface->surface->committed_private = NULL;
surface->surface->updated = NULL;
surface->surface->updated_private = NULL;
weston_desktop_surface_unset_relative_to(surface);
wl_list_remove(&surface->client_link);
@ -185,17 +185,17 @@ weston_desktop_surface_destroy(struct weston_desktop_surface *surface)
}
static void
weston_desktop_surface_surface_committed(struct wl_listener *listener,
void *data)
weston_desktop_surface_surface_updated(struct wl_listener *listener,
void *data)
{
struct weston_desktop_surface *surface =
wl_container_of(listener, surface, surface_commit_listener);
wl_container_of(listener, surface, surface_update_listener);
struct weston_surface *wsurface = surface->surface;
if (surface->implementation->committed != NULL) {
surface->implementation->committed(surface,
surface->implementation_data,
surface->buffer_move);
if (surface->implementation->updated != NULL) {
surface->implementation->updated(surface,
surface->implementation_data,
surface->buffer_move);
}
if (surface->parent != NULL) {
@ -240,10 +240,10 @@ weston_desktop_surface_resource_destroy(struct wl_resource *resource)
}
static void
weston_desktop_surface_committed(struct weston_surface *wsurface,
struct weston_coord_surface new_origin)
weston_desktop_surface_updated(struct weston_surface *wsurface,
struct weston_coord_surface new_origin)
{
struct weston_desktop_surface *surface = wsurface->committed_private;
struct weston_desktop_surface *surface = wsurface->updated_private;
surface->buffer_move = new_origin;
}
@ -287,15 +287,15 @@ weston_desktop_surface_create(struct weston_desktop *desktop,
weston_desktop_client_add_destroy_listener(
client, &surface->client_destroy_listener);
wsurface->committed = weston_desktop_surface_committed;
wsurface->committed_private = surface;
wsurface->updated = weston_desktop_surface_updated;
wsurface->updated_private = surface;
surface->pid = -1;
surface->surface_commit_listener.notify =
weston_desktop_surface_surface_committed;
wl_signal_add(&surface->surface->commit_signal,
&surface->surface_commit_listener);
surface->surface_update_listener.notify =
weston_desktop_surface_surface_updated;
wl_signal_add(&surface->surface->content_update_signal,
&surface->surface_update_listener);
surface->surface_destroy_listener.notify =
weston_desktop_surface_surface_destroyed;
wl_signal_add(&surface->surface->destroy_signal,
@ -357,7 +357,7 @@ weston_desktop_surface_from_grab_link(struct wl_list *grab_link)
WL_EXPORT bool
weston_surface_is_desktop_surface(struct weston_surface *wsurface)
{
return wsurface->committed == weston_desktop_surface_committed;
return wsurface->updated == weston_desktop_surface_updated;
}
WL_EXPORT struct weston_desktop_surface *
@ -365,7 +365,7 @@ weston_surface_get_desktop_surface(struct weston_surface *wsurface)
{
if (!weston_surface_is_desktop_surface(wsurface))
return NULL;
return wsurface->committed_private;
return wsurface->updated_private;
}
WL_EXPORT void

View file

@ -119,7 +119,7 @@ struct weston_desktop_xdg_popup {
struct weston_desktop_xdg_surface base;
struct wl_resource *resource;
bool committed;
bool updated;
struct weston_desktop_xdg_surface *parent;
struct weston_desktop_seat *seat;
struct weston_geometry geometry;
@ -645,8 +645,8 @@ weston_desktop_xdg_toplevel_set_size(struct weston_desktop_surface *dsurface,
}
static void
weston_desktop_xdg_toplevel_committed(struct weston_desktop_xdg_toplevel *toplevel,
struct weston_coord_surface buf_offset)
weston_desktop_xdg_toplevel_updated(struct weston_desktop_xdg_toplevel *toplevel,
struct weston_coord_surface buf_offset)
{
struct weston_surface *wsurface =
weston_desktop_surface_get_surface(toplevel->base.desktop_surface);
@ -658,7 +658,7 @@ weston_desktop_xdg_toplevel_committed(struct weston_desktop_xdg_toplevel *toplev
if (!weston_surface_has_content(wsurface)) {
if (weston_surface_is_unmapping(wsurface))
weston_desktop_api_committed(toplevel->base.desktop,
weston_desktop_api_updated(toplevel->base.desktop,
toplevel->base.desktop_surface, buf_offset);
return;
}
@ -685,9 +685,9 @@ weston_desktop_xdg_toplevel_committed(struct weston_desktop_xdg_toplevel *toplev
toplevel->current.min_size = toplevel->next.min_size;
toplevel->current.max_size = toplevel->next.max_size;
weston_desktop_api_committed(toplevel->base.desktop,
toplevel->base.desktop_surface,
buf_offset);
weston_desktop_api_updated(toplevel->base.desktop,
toplevel->base.desktop_surface,
buf_offset);
}
static void
@ -833,7 +833,7 @@ weston_desktop_xdg_popup_protocol_grab(struct wl_client *wl_client,
return;
}
if (popup->committed) {
if (popup->updated) {
wl_resource_post_error(popup->resource,
ZXDG_POPUP_V6_ERROR_INVALID_GRAB,
"xdg_popup already is mapped");
@ -885,7 +885,7 @@ weston_desktop_xdg_popup_update_position(struct weston_desktop_surface *dsurface
void *user_data);
static void
weston_desktop_xdg_popup_committed(struct weston_desktop_xdg_popup *popup)
weston_desktop_xdg_popup_updated(struct weston_desktop_xdg_popup *popup)
{
struct weston_surface *wsurface =
weston_desktop_surface_get_surface (popup->base.desktop_surface);
@ -894,9 +894,9 @@ weston_desktop_xdg_popup_committed(struct weston_desktop_xdg_popup *popup)
wl_list_for_each(view, &wsurface->views, surface_link)
weston_view_update_transform(view);
if (!popup->committed)
if (!popup->updated)
weston_desktop_xdg_surface_schedule_configure(&popup->base);
popup->committed = true;
popup->updated = true;
weston_desktop_xdg_popup_update_position(popup->base.desktop_surface,
popup);
@ -1301,9 +1301,9 @@ weston_desktop_xdg_surface_ping(struct weston_desktop_surface *dsurface,
}
static void
weston_desktop_xdg_surface_committed(struct weston_desktop_surface *dsurface,
void *user_data,
struct weston_coord_surface buf_offset)
weston_desktop_xdg_surface_updated(struct weston_desktop_surface *dsurface,
void *user_data,
struct weston_coord_surface buf_offset)
{
struct weston_desktop_xdg_surface *surface = user_data;
struct weston_surface *wsurface =
@ -1329,11 +1329,11 @@ weston_desktop_xdg_surface_committed(struct weston_desktop_surface *dsurface,
"xdg_surface must have a role");
break;
case WESTON_DESKTOP_XDG_SURFACE_ROLE_TOPLEVEL:
weston_desktop_xdg_toplevel_committed((struct weston_desktop_xdg_toplevel *) surface,
buf_offset);
weston_desktop_xdg_toplevel_updated((struct weston_desktop_xdg_toplevel *) surface,
buf_offset);
break;
case WESTON_DESKTOP_XDG_SURFACE_ROLE_POPUP:
weston_desktop_xdg_popup_committed((struct weston_desktop_xdg_popup *) surface);
weston_desktop_xdg_popup_updated((struct weston_desktop_xdg_popup *) surface);
break;
}
}
@ -1414,7 +1414,7 @@ static const struct weston_desktop_surface_implementation weston_desktop_xdg_sur
.update_position = weston_desktop_xdg_popup_update_position,
/* Common API */
.committed = weston_desktop_xdg_surface_committed,
.updated = weston_desktop_xdg_surface_updated,
.ping = weston_desktop_xdg_surface_ping,
.close = weston_desktop_xdg_surface_close,

View file

@ -75,7 +75,7 @@ struct weston_desktop_xdg_surface {
struct weston_desktop *desktop;
struct weston_surface *surface;
struct weston_desktop_surface *desktop_surface;
bool committed;
bool updated;
bool configured;
struct wl_event_source *configure_idle;
struct wl_list configure_list; /* weston_desktop_xdg_surface_configure::link */
@ -1077,7 +1077,7 @@ weston_desktop_xdg_toplevel_set_orientation(struct weston_desktop_surface *surfa
}
static void
weston_desktop_xdg_toplevel_committed(struct weston_desktop_xdg_toplevel *toplevel,
weston_desktop_xdg_toplevel_updated(struct weston_desktop_xdg_toplevel *toplevel,
struct weston_coord_surface buf_offset)
{
struct weston_surface *wsurface =
@ -1094,7 +1094,7 @@ weston_desktop_xdg_toplevel_committed(struct weston_desktop_xdg_toplevel *toplev
if (!weston_surface_has_content(wsurface)) {
if (weston_surface_is_unmapping(wsurface))
weston_desktop_api_committed(toplevel->base.desktop,
weston_desktop_api_updated(toplevel->base.desktop,
toplevel->base.desktop_surface, buf_offset);
return;
}
@ -1134,7 +1134,7 @@ weston_desktop_xdg_toplevel_committed(struct weston_desktop_xdg_toplevel *toplev
toplevel->current.min_size = toplevel->next.min_size;
toplevel->current.max_size = toplevel->next.max_size;
weston_desktop_api_committed(toplevel->base.desktop,
weston_desktop_api_updated(toplevel->base.desktop,
toplevel->base.desktop_surface,
buf_offset);
}
@ -1281,7 +1281,7 @@ weston_desktop_xdg_popup_protocol_grab(struct wl_client *wl_client,
return;
}
if (popup->base.committed) {
if (popup->base.updated) {
wl_resource_post_error(popup->resource,
XDG_POPUP_ERROR_INVALID_GRAB,
"xdg_popup already is mapped");
@ -1373,7 +1373,7 @@ weston_desktop_xdg_popup_update_position(struct weston_desktop_surface *dsurface
void *user_data);
static void
weston_desktop_xdg_popup_committed(struct weston_desktop_xdg_popup *popup)
weston_desktop_xdg_popup_updated(struct weston_desktop_xdg_popup *popup)
{
struct weston_surface *wsurface =
weston_desktop_surface_get_surface (popup->base.desktop_surface);
@ -1574,7 +1574,7 @@ weston_desktop_xdg_surface_schedule_configure(struct weston_desktop_xdg_surface
struct wl_event_loop *loop = wl_display_get_event_loop(display);
bool pending_same = false;
if (!surface->committed)
if (!surface->updated)
return;
switch (surface->role) {
@ -1869,7 +1869,7 @@ weston_desktop_xdg_surface_ping(struct weston_desktop_surface *dsurface,
}
static void
weston_desktop_xdg_surface_committed(struct weston_desktop_surface *dsurface,
weston_desktop_xdg_surface_updated(struct weston_desktop_surface *dsurface,
void *user_data,
struct weston_coord_surface c)
{
@ -1893,8 +1893,8 @@ weston_desktop_xdg_surface_committed(struct weston_desktop_surface *dsurface,
surface->next_geometry);
}
if (!surface->committed) {
surface->committed = true;
if (!surface->updated) {
surface->updated = true;
weston_desktop_xdg_surface_schedule_configure(surface);
}
@ -1905,10 +1905,10 @@ weston_desktop_xdg_surface_committed(struct weston_desktop_surface *dsurface,
"xdg_surface must have a role");
break;
case WESTON_DESKTOP_XDG_SURFACE_ROLE_TOPLEVEL:
weston_desktop_xdg_toplevel_committed((struct weston_desktop_xdg_toplevel *) surface, c);
weston_desktop_xdg_toplevel_updated((struct weston_desktop_xdg_toplevel *) surface, c);
break;
case WESTON_DESKTOP_XDG_SURFACE_ROLE_POPUP:
weston_desktop_xdg_popup_committed((struct weston_desktop_xdg_popup *) surface);
weston_desktop_xdg_popup_updated((struct weston_desktop_xdg_popup *) surface);
break;
}
}
@ -1990,7 +1990,7 @@ static const struct weston_desktop_surface_implementation weston_desktop_xdg_sur
.update_position = weston_desktop_xdg_popup_update_position,
/* Common API */
.committed = weston_desktop_xdg_surface_committed,
.updated = weston_desktop_xdg_surface_updated,
.ping = weston_desktop_xdg_surface_ping,
.close = weston_desktop_xdg_surface_close,
@ -2052,7 +2052,7 @@ weston_desktop_xdg_shell_protocol_get_xdg_surface(struct wl_client *wl_client,
wl_resource_get_user_data(surface_resource);
struct weston_desktop_xdg_surface *surface;
if (wsurface->committed) {
if (wsurface->updated) {
wl_resource_post_error(resource,
XDG_WM_BASE_ERROR_ROLE,
"xdg_surface must not have any other role");

View file

@ -62,7 +62,7 @@ struct weston_desktop_xwayland_surface {
const struct weston_xwayland_client_interface *client_interface;
struct weston_geometry next_geometry;
bool has_next_geometry;
bool committed;
bool updated;
bool added;
enum weston_desktop_xwayland_surface_state state;
enum weston_desktop_xwayland_surface_state prev_state;
@ -111,13 +111,13 @@ weston_desktop_xwayland_surface_change_state(struct weston_desktop_xwayland_surf
weston_desktop_api_surface_added(surface->desktop,
surface->surface);
surface->added = true;
if (surface->state == NONE && surface->committed)
if (surface->state == NONE && surface->updated)
/* We had a race, and wl_surface.commit() was
* faster, just fake a commit to map the
* surface */
weston_desktop_api_committed(surface->desktop,
surface->surface,
zero);
weston_desktop_api_updated(surface->desktop,
surface->surface,
zero);
} else if (surface->added) {
weston_desktop_api_surface_removed(surface->desktop,
@ -155,16 +155,16 @@ weston_desktop_xwayland_surface_change_state(struct weston_desktop_xwayland_surf
}
static void
weston_desktop_xwayland_surface_committed(struct weston_desktop_surface *dsurface,
void *user_data,
struct weston_coord_surface buf_offset)
weston_desktop_xwayland_surface_updated(struct weston_desktop_surface *dsurface,
void *user_data,
struct weston_coord_surface buf_offset)
{
struct weston_desktop_xwayland_surface *surface = user_data;
struct weston_geometry oldgeom;
struct weston_coord_surface tmp;
assert(dsurface == surface->surface);
surface->committed = true;
surface->updated = true;
#ifdef WM_DEBUG
weston_log("%s: xwayland surface %s\n", __func__, surface->internal_name);
@ -190,8 +190,8 @@ weston_desktop_xwayland_surface_committed(struct weston_desktop_surface *dsurfac
}
if (surface->added)
weston_desktop_api_committed(surface->desktop, surface->surface,
tmp);
weston_desktop_api_updated(surface->desktop, surface->surface,
tmp);
/* If we're an override redirect window, the shell has no knowledge of
* our existence, so it won't assign us an output.
@ -277,7 +277,7 @@ weston_desktop_xwayland_surface_get_fullscreen(struct weston_desktop_surface *ds
}
static const struct weston_desktop_surface_implementation weston_desktop_xwayland_surface_internal_implementation = {
.committed = weston_desktop_xwayland_surface_committed,
.updated = weston_desktop_xwayland_surface_updated,
.set_size = weston_desktop_xwayland_surface_set_size,
.set_fullscreen = weston_desktop_xwayland_surface_set_fullscreen,

View file

@ -1286,8 +1286,8 @@ pointer_unmap_sprite(struct weston_pointer *pointer)
weston_surface_unmap(surface);
wl_list_remove(&pointer->sprite_destroy_listener.link);
surface->committed = NULL;
surface->committed_private = NULL;
surface->updated = NULL;
surface->updated_private = NULL;
weston_surface_set_label(surface, NULL);
weston_view_destroy(pointer->sprite);
pointer->sprite = NULL;
@ -1840,8 +1840,8 @@ tablet_tool_unmap_sprite(struct weston_tablet_tool *tool)
weston_surface_unmap(tool->sprite->surface);
wl_list_remove(&tool->sprite_destroy_listener.link);
tool->sprite->surface->committed = NULL;
tool->sprite->surface->committed_private = NULL;
tool->sprite->surface->updated = NULL;
tool->sprite->surface->updated_private = NULL;
weston_view_destroy(tool->sprite);
tool->sprite = NULL;
}
@ -3207,10 +3207,10 @@ notify_tablet_added(struct weston_tablet *tablet)
}
static void
tablet_tool_cursor_surface_committed(struct weston_surface *es,
struct weston_coord_surface new_origin)
tablet_tool_cursor_surface_updated(struct weston_surface *es,
struct weston_coord_surface new_origin)
{
struct weston_tablet_tool *tool = es->committed_private;
struct weston_tablet_tool *tool = es->updated_private;
struct weston_coord_surface hotspot_inv;
if (es->width == 0)
@ -3263,7 +3263,7 @@ tablet_tool_set_cursor(struct wl_client *client, struct wl_resource *resource,
return;
if (surface && tool->sprite && surface != tool->sprite->surface &&
surface->committed) {
surface->updated) {
wl_resource_post_error(surface->resource,
WL_DISPLAY_ERROR_INVALID_OBJECT,
"surface->configure already set");
@ -3278,8 +3278,8 @@ tablet_tool_set_cursor(struct wl_client *client, struct wl_resource *resource,
wl_signal_add(&surface->destroy_signal,
&tool->sprite_destroy_listener);
surface->committed = tablet_tool_cursor_surface_committed;
surface->committed_private = tool;
surface->updated = tablet_tool_cursor_surface_updated;
surface->updated_private = tool;
tool->sprite = weston_view_create(surface);
tool->hotspot = weston_coord_surface(hotspot_x, hotspot_y, surface);
@ -3287,7 +3287,7 @@ tablet_tool_set_cursor(struct wl_client *client, struct wl_resource *resource,
struct weston_coord_surface delta =
weston_coord_surface(0, 0, surface);
tablet_tool_cursor_surface_committed(surface, delta);
tablet_tool_cursor_surface_updated(surface, delta);
}
}
@ -3499,10 +3499,10 @@ notify_tablet_tool_frame(struct weston_tablet_tool *tool,
static void
pointer_cursor_surface_committed(struct weston_surface *es,
struct weston_coord_surface new_origin)
pointer_cursor_surface_updated(struct weston_surface *es,
struct weston_coord_surface new_origin)
{
struct weston_pointer *pointer = es->committed_private;
struct weston_pointer *pointer = es->updated_private;
struct weston_coord_surface hotspot_inv;
if (es->width == 0)
@ -3574,8 +3574,8 @@ pointer_set_cursor(struct wl_client *client, struct wl_resource *resource,
wl_signal_add(&surface->destroy_signal,
&pointer->sprite_destroy_listener);
surface->committed = pointer_cursor_surface_committed;
surface->committed_private = pointer;
surface->updated = pointer_cursor_surface_updated;
surface->updated_private = pointer;
weston_surface_set_label_static(surface, "cursor");
pointer->sprite = weston_view_create(surface);
}
@ -3586,7 +3586,7 @@ pointer_set_cursor(struct wl_client *client, struct wl_resource *resource,
struct weston_coord_surface zero;
zero = weston_coord_surface(0, 0, surface);
pointer_cursor_surface_committed(surface, zero);
pointer_cursor_surface_updated(surface, zero);
weston_view_schedule_repaint(pointer->sprite);
}
}
@ -4649,7 +4649,7 @@ weston_pointer_constraint_destroy(struct weston_pointer_constraint *constraint)
weston_pointer_constraint_disable(constraint);
wl_list_remove(&constraint->pointer_destroy_listener.link);
wl_list_remove(&constraint->surface_commit_listener.link);
wl_list_remove(&constraint->surface_update_listener.link);
wl_list_remove(&constraint->surface_activate_listener.link);
wl_resource_set_user_data(constraint->resource, NULL);
@ -4856,11 +4856,11 @@ pointer_constraint_view_unmapped(struct wl_listener *listener, void *data)
}
static void
pointer_constraint_surface_committed(struct wl_listener *listener, void *data)
pointer_constraint_surface_updated(struct wl_listener *listener, void *data)
{
struct weston_pointer_constraint *constraint =
container_of(listener, struct weston_pointer_constraint,
surface_commit_listener);
surface_update_listener);
if (constraint->region_is_pending) {
constraint->region_is_pending = false;
@ -4916,8 +4916,8 @@ weston_pointer_constraint_create(struct weston_surface *surface,
pointer_constraint_surface_activate;
constraint->view_unmap_listener.notify =
pointer_constraint_view_unmapped;
constraint->surface_commit_listener.notify =
pointer_constraint_surface_committed;
constraint->surface_update_listener.notify =
pointer_constraint_surface_updated;
constraint->pointer_destroy_listener.notify =
pointer_constraint_pointer_destroyed;
@ -4925,8 +4925,8 @@ weston_pointer_constraint_create(struct weston_surface *surface,
&constraint->surface_activate_listener);
wl_signal_add(&pointer->destroy_signal,
&constraint->pointer_destroy_listener);
wl_signal_add(&surface->commit_signal,
&constraint->surface_commit_listener);
wl_signal_add(&surface->content_update_signal,
&constraint->surface_update_listener);
return constraint;
}

View file

@ -184,8 +184,8 @@ weston_shell_utils_curtain_create(struct weston_compositor *compositor,
curtain->view = view;
curtain->buffer_ref = buffer_ref;
surface->committed = params->surface_committed;
surface->committed_private = params->surface_private;
surface->updated = params->surface_updated;
surface->updated_private = params->surface_private;
weston_surface_set_label(surface, params->label);
weston_surface_attach_solid(surface, buffer_ref, params->width,

View file

@ -430,9 +430,8 @@ weston_surface_apply_state(struct weston_surface *surface,
}
if ((status & (WESTON_SURFACE_DIRTY_BUFFER | WESTON_SURFACE_DIRTY_SIZE |
WESTON_SURFACE_DIRTY_POS)) &&
surface->committed)
surface->committed(surface, state->buf_offset);
WESTON_SURFACE_DIRTY_POS)) && surface->updated)
surface->updated(surface, state->buf_offset);
state->buf_offset = weston_coord_surface(0, 0, surface);
@ -510,7 +509,7 @@ weston_surface_apply_state(struct weston_surface *surface,
weston_surface_set_color_profile(surface, state->color_profile,
state->render_intent);
wl_signal_emit(&surface->commit_signal, surface);
wl_signal_emit(&surface->content_update_signal, surface);
if (status & WESTON_SURFACE_DIRTY_SUBSURFACE_CONFIG)
weston_surface_apply_subsurface_order(surface);

View file

@ -46,7 +46,7 @@ struct weston_touch_calibrator {
struct weston_surface *surface;
struct wl_listener surface_destroy_listener;
struct wl_listener surface_commit_listener;
struct wl_listener surface_update_listener;
struct weston_touch_device *device;
struct wl_listener device_destroy_listener;
@ -210,8 +210,8 @@ unmap_calibrator(struct weston_touch_calibrator *calibrator)
{
struct weston_touch_device *device = calibrator->device;
wl_list_remove(&calibrator->surface_commit_listener.link);
wl_list_init(&calibrator->surface_commit_listener.link);
wl_list_remove(&calibrator->surface_update_listener.link);
wl_list_init(&calibrator->surface_update_listener.link);
if (!calibrator->view)
return;
@ -243,15 +243,15 @@ touch_calibrator_mode_changed(struct weston_compositor *compositor)
}
static void
touch_calibrator_surface_committed(struct wl_listener *listener, void *data)
touch_calibrator_surface_updated(struct wl_listener *listener, void *data)
{
struct weston_touch_calibrator *calibrator =
container_of(listener, struct weston_touch_calibrator,
surface_commit_listener);
surface_update_listener);
struct weston_surface *surface = calibrator->surface;
wl_list_remove(&calibrator->surface_commit_listener.link);
wl_list_init(&calibrator->surface_commit_listener.link);
wl_list_remove(&calibrator->surface_update_listener.link);
wl_list_init(&calibrator->surface_update_listener.link);
if (!weston_surface_has_content(surface)) {
wl_resource_post_error(calibrator->resource,
@ -363,7 +363,7 @@ destroy_touch_calibrator(struct wl_resource *resource)
if (calibrator->surface) {
unmap_calibrator(calibrator);
wl_list_remove(&calibrator->surface_destroy_listener.link);
wl_list_remove(&calibrator->surface_commit_listener.link);
wl_list_remove(&calibrator->surface_update_listener.link);
}
if (calibrator->device)
@ -525,10 +525,10 @@ touch_calibration_create_calibrator(
&calibrator->surface_destroy_listener);
calibrator->surface = surface;
calibrator->surface_commit_listener.notify =
touch_calibrator_surface_committed;
wl_signal_add(&surface->commit_signal,
&calibrator->surface_commit_listener);
calibrator->surface_update_listener.notify =
touch_calibrator_surface_updated;
wl_signal_add(&surface->content_update_signal,
&calibrator->surface_update_listener);
device = weston_compositor_find_touch_device_by_syspath(compositor,
syspath);
@ -571,7 +571,7 @@ touch_calibration_create_calibrator(
return;
err_unlink_surface:
wl_list_remove(&calibrator->surface_commit_listener.link);
wl_list_remove(&calibrator->surface_update_listener.link);
wl_list_remove(&calibrator->surface_destroy_listener.link);
err_destroy_resource:

View file

@ -567,18 +567,18 @@ desktop_surface_removed(struct weston_desktop_surface *desktop_surface,
}
static void
desktop_surface_committed(struct weston_desktop_surface *desktop_surface,
struct weston_coord_surface buf_offset, void *data)
desktop_surface_updated(struct weston_desktop_surface *desktop_surface,
struct weston_coord_surface buf_offset, void *data)
{
struct lua_shell_surface *shsurf =
weston_desktop_surface_get_user_data(desktop_surface);
struct lua_State *lua = shsurf->shell->lua;
if (!lua_shell_push_function(shsurf->shell, LUA_SHELL_CB_SURFACE_COMMITTED))
if (!lua_shell_push_function(shsurf->shell, LUA_SHELL_CB_SURFACE_UPDATED))
return;
lua_rawgeti(lua, LUA_REGISTRYINDEX, shsurf->lua_regid);
lua_shell_call_function(shsurf->shell, "surface_committed", 1, 0);
lua_shell_call_function(shsurf->shell, "surface_updated", 1, 0);
}
static void
@ -712,7 +712,7 @@ static const struct weston_desktop_api lua_shell_desktop_api = {
.struct_size = sizeof(struct weston_desktop_api),
.surface_added = desktop_surface_added,
.surface_removed = desktop_surface_removed,
.committed = desktop_surface_committed,
.updated = desktop_surface_updated,
.move = desktop_surface_move,
.resize = desktop_surface_resize,
.set_parent = desktop_surface_set_parent,
@ -1808,7 +1808,7 @@ lua_shell_env_init_callbacks(struct lua_shell *shell)
cb[LUA_SHELL_CB_KEYBOARD_FOCUS].name = "keyboard_focus";
cb[LUA_SHELL_CB_SEAT_CREATE].name = "seat_create";
cb[LUA_SHELL_CB_SURFACE_ADDED].name = "surface_added";
cb[LUA_SHELL_CB_SURFACE_COMMITTED].name = "surface_committed";
cb[LUA_SHELL_CB_SURFACE_UPDATED].name = "surface_updated";
cb[LUA_SHELL_CB_SURFACE_MOVE].name = "surface_move";
cb[LUA_SHELL_CB_SURFACE_REMOVED].name = "surface_removed";
cb[LUA_SHELL_CB_SURFACE_RESIZE].name = "surface_resize";

View file

@ -47,7 +47,7 @@ enum lua_shell_cb_id {
LUA_SHELL_CB_SEAT_CREATE,
LUA_SHELL_CB_SET_XWAYLAND_POSITION,
LUA_SHELL_CB_SURFACE_ADDED,
LUA_SHELL_CB_SURFACE_COMMITTED,
LUA_SHELL_CB_SURFACE_UPDATED,
LUA_SHELL_CB_SURFACE_MOVE,
LUA_SHELL_CB_SURFACE_REMOVED,
LUA_SHELL_CB_SURFACE_RESIZE,

View file

@ -267,7 +267,7 @@ function lower_fullscreen_layer(surface, output)
end
end
function surface_committed(surface)
function surface_updated(surface)
local pd = surface:get_private()
local w, h = surface:get_dimensions()
local good_seat = nil
@ -352,7 +352,7 @@ end
lua_shell_callbacks = {
init = my_init,
surface_added = surface_added,
surface_committed = surface_committed,
surface_updated = surface_updated,
surface_fullscreen = surface_fullscreen,
surface_maximize = surface_maximize,
surface_removed = surface_removed,

View file

@ -145,7 +145,7 @@
compositor sends a configure event which the client must obey with the
associated wl_surface.
Once the client has committed content to the surface, the compositor can
Once the client has applied content to the surface, the compositor can
grab the touch input device, prevent it from emitting normal touch
events, show the surface on the correct output, and relay input events
from the touch device via this protocol object.
@ -203,7 +203,7 @@
The coordinates given as arguments to this request are relative to
the associated wl_surface.
If a client asks for conversion before it has committed valid
If a client asks for conversion before it has applied valid
content to the wl_surface, the not_mapped error is raised.
If the coordinates x, y are outside of the wl_surface content, the

View file

@ -159,7 +159,7 @@ TEST(buffer_release)
/*
* buf1 must never be released, since it is replaced before
* it is committed, therefore it never becomes busy.
* it is applied, therefore it never becomes busy.
*/
wl_surface_attach(surface, buf1->proxy, 0, 0);

View file

@ -87,14 +87,14 @@ desktop_surface_removed(struct weston_desktop_surface *desktop_surface,
}
static void
black_surface_committed(struct weston_surface *es,
struct weston_coord_surface new_origin)
black_surface_updated(struct weston_surface *es,
struct weston_coord_surface new_origin)
{
}
static void
desktop_surface_committed(struct weston_desktop_surface *desktop_surface,
struct weston_coord_surface unused, void *shell)
desktop_surface_updated(struct weston_desktop_surface *desktop_surface,
struct weston_coord_surface unused, void *shell)
{
struct desktest_shell *dts = shell;
struct desktest_surface *dtsurface =
@ -136,7 +136,7 @@ desktop_surface_committed(struct weston_desktop_surface *desktop_surface,
.r = 0.0, .g = 0.0, .b = 0.0, .a = 1.0,
.pos = output->pos,
.width = output->width, .height = output->height,
.surface_committed = black_surface_committed,
.surface_updated = black_surface_updated,
.label = xstrdup("fullscreen black background surface"),
.surface_private = dtsurface->view,
.capture_input = true,
@ -213,7 +213,7 @@ static const struct weston_desktop_api shell_desktop_api = {
.struct_size = sizeof(struct weston_desktop_api),
.surface_added = desktop_surface_added,
.surface_removed = desktop_surface_removed,
.committed = desktop_surface_committed,
.updated = desktop_surface_updated,
.move = desktop_surface_move,
.resize = desktop_surface_resize,
.fullscreen_requested = desktop_surface_fullscreen_requested,
@ -303,7 +303,7 @@ wet_shell_init(struct weston_compositor *ec,
.pos = output->pos,
.width = output->width, .height = output->height,
.capture_input = true,
.surface_committed = NULL,
.surface_updated = NULL,
.label = xstrdup("test desktop shell background"),
.surface_private = NULL,
};

View file

@ -279,10 +279,10 @@ notify_pointer_position(struct weston_test *test, struct wl_resource *resource)
}
static void
test_surface_committed(struct weston_surface *surface,
struct weston_coord_surface new_origin)
test_surface_updated(struct weston_surface *surface,
struct weston_coord_surface new_origin)
{
struct weston_test_surface *test_surface = surface->committed_private;
struct weston_test_surface *test_surface = surface->updated_private;
struct weston_test *test = test_surface->test;
struct weston_coord_global pos;
@ -307,8 +307,8 @@ test_surface_destroy(struct weston_test_surface *test_surface)
{
weston_view_destroy(test_surface->view);
test_surface->surface->committed = NULL;
test_surface->surface->committed_private = NULL;
test_surface->surface->updated = NULL;
test_surface->surface->updated_private = NULL;
weston_surface_set_label(test_surface->surface, NULL);
wl_list_remove(&test_surface->surface_destroy_listener.link);
@ -352,8 +352,8 @@ weston_test_surface_create(struct wl_resource *test_resource,
WL_DISPLAY_ERROR_INVALID_OBJECT) < 0)
goto err_free_view;
surface->committed_private = test_surface;
surface->committed = test_surface_committed;
surface->updated_private = test_surface;
surface->updated = test_surface_updated;
weston_surface_set_label_static(surface, "test suite surface");
test_surface->surface_destroy_listener.notify =
@ -384,8 +384,8 @@ move_surface(struct wl_client *client, struct wl_resource *resource,
struct weston_test_surface *test_surface;
struct wl_resource *display_resource;
if (surface->committed &&
surface->committed != test_surface_committed) {
if (surface->updated &&
surface->updated != test_surface_updated) {
display_resource = wl_client_get_object(client, 1);
wl_resource_post_error(display_resource,
WL_DISPLAY_ERROR_INVALID_OBJECT,
@ -394,7 +394,7 @@ move_surface(struct wl_client *client, struct wl_resource *resource,
return;
}
test_surface = surface->committed_private;
test_surface = surface->updated_private;
if (!test_surface)
test_surface = weston_test_surface_create(resource, surface);
if (!test_surface)

View file

@ -46,7 +46,7 @@ fixture_setup(struct weston_test_harness *harness)
/* We need to use the pixman renderer, since a few of the tests depend
* on the renderer holding onto a surface buffer until the next one
* is committed, which the noop renderer doesn't do. */
* is applied, which the noop renderer doesn't do. */
setup.renderer = WESTON_RENDERER_PIXMAN;
return weston_test_harness_execute_as_client(harness, &setup);

View file

@ -103,7 +103,7 @@ surface_commit_color(struct client *client, struct surface *surface,
return buf;
}
TEST(pointer_cursor_retains_committed_buffer_after_reenter)
TEST(pointer_cursor_retains_applied_buffer_after_reenter)
{
struct client *client;
pixman_color_t red;

View file

@ -82,7 +82,7 @@ output_create_view(struct test_output *t_output)
.pos.c = weston_coord(0, 0),
.width = 320, .height = 240,
.label = NULL,
.surface_committed = NULL,
.surface_updated = NULL,
.surface_private = NULL,
};

View file

@ -189,7 +189,7 @@ struct xwl_surface {
struct weston_wm *wm;
struct weston_surface *weston_surface;
uint64_t serial;
struct wl_listener surface_commit_listener;
struct wl_listener surface_update_listener;
struct wl_list link;
};
@ -2743,7 +2743,7 @@ free_xwl_surface(struct wl_resource *resource)
{
struct xwl_surface *xsurf = wl_resource_get_user_data(resource);
wl_list_remove(&xsurf->surface_commit_listener.link);
wl_list_remove(&xsurf->surface_update_listener.link);
wl_list_remove(&xsurf->link);
free(xsurf);
}
@ -2785,19 +2785,19 @@ static const struct xwayland_surface_v1_interface xwl_surface_interface = {
};
static void
xwl_surface_committed(struct wl_listener *listener, void *data)
xwl_surface_updated(struct wl_listener *listener, void *data)
{
struct weston_wm_window *window, *next;
struct xwl_surface *xsurf = wl_container_of(listener, xsurf,
surface_commit_listener);
surface_update_listener);
/* We haven't set a serial yet */
if (xsurf->serial == 0)
return;
window = get_wm_window(xsurf->weston_surface);
wl_list_remove(&xsurf->surface_commit_listener.link);
wl_list_init(&xsurf->surface_commit_listener.link);
wl_list_remove(&xsurf->surface_update_listener.link);
wl_list_init(&xsurf->surface_update_listener.link);
wl_list_for_each_safe(window, next, &xsurf->wm->unpaired_window_list, link) {
if (window->surface_serial == xsurf->serial) {
@ -2842,8 +2842,8 @@ get_xwl_surface(struct wl_client *client, struct wl_resource *resource,
wl_resource_set_implementation(xsurf->resource, &xwl_surface_interface,
xsurf, free_xwl_surface);
xsurf->surface_commit_listener.notify = xwl_surface_committed;
wl_signal_add(&surf->commit_signal, &xsurf->surface_commit_listener);
xsurf->surface_update_listener.notify = xwl_surface_updated;
wl_signal_add(&surf->content_update_signal, &xsurf->surface_update_listener);
return;
@ -3367,7 +3367,7 @@ xserver_map_shell_surface(struct weston_wm_window *window,
if (!xwayland_interface)
return;
if (window->surface->committed) {
if (window->surface->updated) {
weston_log("warning, unexpected in %s: "
"surface's configure hook is already set.\n",
__func__);