libweston: Rename weston_surface::configure to ::committed
Signed-off-by: Quentin Glidic <sardemff7+git@sardemff7.net> Reviewed-by: Jonas Ådahl <jadahl@gmail.com> Acked-by: Giulio Camuffo <giulio.camuffo@kdab.com> Differential Revision: https://phabricator.freedesktop.org/D1246
This commit is contained in:
parent
cde1345d69
commit
2edc3d5462
|
@ -166,9 +166,9 @@ input_panel_get_label(struct weston_surface *surface, char *buf, size_t len)
|
|||
}
|
||||
|
||||
static void
|
||||
input_panel_configure(struct weston_surface *surface, int32_t sx, int32_t sy)
|
||||
input_panel_committed(struct weston_surface *surface, int32_t sx, int32_t sy)
|
||||
{
|
||||
struct input_panel_surface *ip_surface = surface->configure_private;
|
||||
struct input_panel_surface *ip_surface = surface->committed_private;
|
||||
struct desktop_shell *shell = ip_surface->shell;
|
||||
struct weston_view *view;
|
||||
float x, y;
|
||||
|
@ -201,7 +201,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->configure = NULL;
|
||||
input_panel_surface->surface->committed = NULL;
|
||||
weston_surface_set_label_func(input_panel_surface->surface, NULL);
|
||||
weston_view_destroy(input_panel_surface->view);
|
||||
|
||||
|
@ -211,8 +211,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->configure == input_panel_configure) {
|
||||
return surface->configure_private;
|
||||
if (surface->committed == input_panel_committed) {
|
||||
return surface->committed_private;
|
||||
} else {
|
||||
return NULL;
|
||||
}
|
||||
|
@ -242,8 +242,8 @@ create_input_panel_surface(struct desktop_shell *shell,
|
|||
if (!input_panel_surface)
|
||||
return NULL;
|
||||
|
||||
surface->configure = input_panel_configure;
|
||||
surface->configure_private = input_panel_surface;
|
||||
surface->committed = input_panel_committed;
|
||||
surface->committed_private = input_panel_surface;
|
||||
weston_surface_set_label_func(surface, input_panel_get_label);
|
||||
|
||||
input_panel_surface->shell = shell;
|
||||
|
@ -328,7 +328,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->configure already set");
|
||||
"surface->committed already set");
|
||||
return;
|
||||
}
|
||||
|
||||
|
|
|
@ -705,15 +705,15 @@ focus_surface_get_label(struct weston_surface *surface, char *buf, size_t len)
|
|||
|
||||
/* no-op func for checking focus surface */
|
||||
static void
|
||||
focus_surface_configure(struct weston_surface *es, int32_t sx, int32_t sy)
|
||||
focus_surface_committed(struct weston_surface *es, int32_t sx, int32_t sy)
|
||||
{
|
||||
}
|
||||
|
||||
static struct focus_surface *
|
||||
get_focus_surface(struct weston_surface *surface)
|
||||
{
|
||||
if (surface->configure == focus_surface_configure)
|
||||
return surface->configure_private;
|
||||
if (surface->committed == focus_surface_committed)
|
||||
return surface->committed_private;
|
||||
else
|
||||
return NULL;
|
||||
}
|
||||
|
@ -721,7 +721,7 @@ get_focus_surface(struct weston_surface *surface)
|
|||
static bool
|
||||
is_focus_surface (struct weston_surface *es)
|
||||
{
|
||||
return (es->configure == focus_surface_configure);
|
||||
return (es->committed == focus_surface_committed);
|
||||
}
|
||||
|
||||
static bool
|
||||
|
@ -748,10 +748,10 @@ create_focus_surface(struct weston_compositor *ec,
|
|||
return NULL;
|
||||
}
|
||||
|
||||
surface->configure = focus_surface_configure;
|
||||
surface->committed = focus_surface_committed;
|
||||
surface->output = output;
|
||||
surface->is_mapped = true;
|
||||
surface->configure_private = fsurf;
|
||||
surface->committed_private = fsurf;
|
||||
weston_surface_set_label_func(surface, focus_surface_get_label);
|
||||
|
||||
fsurf->view = weston_view_create(surface);
|
||||
|
@ -2777,7 +2777,7 @@ shell_surface_get_shell(struct shell_surface *shsurf)
|
|||
static int
|
||||
black_surface_get_label(struct weston_surface *surface, char *buf, size_t len)
|
||||
{
|
||||
struct weston_view *fs_view = surface->configure_private;
|
||||
struct weston_view *fs_view = surface->committed_private;
|
||||
struct weston_surface *fs_surface = fs_view->surface;
|
||||
int n;
|
||||
int rem;
|
||||
|
@ -2803,7 +2803,7 @@ black_surface_get_label(struct weston_surface *surface, char *buf, size_t len)
|
|||
}
|
||||
|
||||
static void
|
||||
black_surface_configure(struct weston_surface *es, int32_t sx, int32_t sy);
|
||||
black_surface_committed(struct weston_surface *es, int32_t sx, int32_t sy);
|
||||
|
||||
static struct weston_view *
|
||||
create_black_surface(struct weston_compositor *ec,
|
||||
|
@ -2825,8 +2825,8 @@ create_black_surface(struct weston_compositor *ec,
|
|||
return NULL;
|
||||
}
|
||||
|
||||
surface->configure = black_surface_configure;
|
||||
surface->configure_private = fs_view;
|
||||
surface->committed = black_surface_committed;
|
||||
surface->committed_private = fs_view;
|
||||
weston_surface_set_label_func(surface, black_surface_get_label);
|
||||
weston_surface_set_color(surface, 0.0, 0.0, 0.0, 1);
|
||||
pixman_region32_fini(&surface->opaque);
|
||||
|
@ -3591,7 +3591,7 @@ destroy_shell_surface(struct shell_surface *shsurf)
|
|||
* we can always remove the listener.
|
||||
*/
|
||||
wl_list_remove(&shsurf->surface_destroy_listener.link);
|
||||
shsurf->surface->configure = NULL;
|
||||
shsurf->surface->committed = NULL;
|
||||
weston_surface_set_label_func(shsurf->surface, NULL);
|
||||
free(shsurf->title);
|
||||
|
||||
|
@ -3678,13 +3678,13 @@ handle_resource_destroy(struct wl_listener *listener, void *data)
|
|||
}
|
||||
|
||||
static void
|
||||
shell_surface_configure(struct weston_surface *, int32_t, int32_t);
|
||||
shell_surface_committed(struct weston_surface *, int32_t, int32_t);
|
||||
|
||||
struct shell_surface *
|
||||
get_shell_surface(struct weston_surface *surface)
|
||||
{
|
||||
if (surface->configure == shell_surface_configure)
|
||||
return surface->configure_private;
|
||||
if (surface->committed == shell_surface_committed)
|
||||
return surface->committed_private;
|
||||
else
|
||||
return NULL;
|
||||
}
|
||||
|
@ -3696,7 +3696,7 @@ create_common_surface(struct shell_client *owner, void *shell,
|
|||
{
|
||||
struct shell_surface *shsurf;
|
||||
|
||||
assert(surface->configure == NULL);
|
||||
assert(surface->committed == NULL);
|
||||
|
||||
shsurf = calloc(1, sizeof *shsurf);
|
||||
if (!shsurf) {
|
||||
|
@ -3711,8 +3711,8 @@ create_common_surface(struct shell_client *owner, void *shell,
|
|||
return NULL;
|
||||
}
|
||||
|
||||
surface->configure = shell_surface_configure;
|
||||
surface->configure_private = shsurf;
|
||||
surface->committed = shell_surface_committed;
|
||||
surface->committed_private = shsurf;
|
||||
weston_surface_set_label_func(surface, shell_surface_get_label);
|
||||
|
||||
shsurf->resource_destroy_listener.notify = handle_resource_destroy;
|
||||
|
@ -4366,7 +4366,7 @@ configure_static_view(struct weston_view *ev, struct weston_layer *layer)
|
|||
wl_list_for_each_safe(v, next, &layer->view_list.link, layer_link.link) {
|
||||
if (v->output == ev->output && v != ev) {
|
||||
weston_view_unmap(v);
|
||||
v->surface->configure = NULL;
|
||||
v->surface->committed = NULL;
|
||||
weston_surface_set_label_func(v->surface, NULL);
|
||||
}
|
||||
}
|
||||
|
@ -4403,9 +4403,9 @@ background_get_label(struct weston_surface *surface, char *buf, size_t len)
|
|||
}
|
||||
|
||||
static void
|
||||
background_configure(struct weston_surface *es, int32_t sx, int32_t sy)
|
||||
background_committed(struct weston_surface *es, int32_t sx, int32_t sy)
|
||||
{
|
||||
struct desktop_shell *shell = es->configure_private;
|
||||
struct desktop_shell *shell = es->committed_private;
|
||||
struct weston_view *view;
|
||||
|
||||
view = container_of(es->views.next, struct weston_view, surface_link);
|
||||
|
@ -4435,7 +4435,7 @@ desktop_shell_set_background(struct wl_client *client,
|
|||
struct shell_output *sh_output;
|
||||
struct weston_view *view, *next;
|
||||
|
||||
if (surface->configure) {
|
||||
if (surface->committed) {
|
||||
wl_resource_post_error(surface_resource,
|
||||
WL_DISPLAY_ERROR_INVALID_OBJECT,
|
||||
"surface role already assigned");
|
||||
|
@ -4446,8 +4446,8 @@ desktop_shell_set_background(struct wl_client *client,
|
|||
weston_view_destroy(view);
|
||||
view = weston_view_create(surface);
|
||||
|
||||
surface->configure = background_configure;
|
||||
surface->configure_private = shell;
|
||||
surface->committed = background_committed;
|
||||
surface->committed_private = shell;
|
||||
weston_surface_set_label_func(surface, background_get_label);
|
||||
surface->output = wl_resource_get_user_data(output_resource);
|
||||
view->output = surface->output;
|
||||
|
@ -4471,9 +4471,9 @@ panel_get_label(struct weston_surface *surface, char *buf, size_t len)
|
|||
}
|
||||
|
||||
static void
|
||||
panel_configure(struct weston_surface *es, int32_t sx, int32_t sy)
|
||||
panel_committed(struct weston_surface *es, int32_t sx, int32_t sy)
|
||||
{
|
||||
struct desktop_shell *shell = es->configure_private;
|
||||
struct desktop_shell *shell = es->committed_private;
|
||||
struct weston_view *view;
|
||||
|
||||
view = container_of(es->views.next, struct weston_view, surface_link);
|
||||
|
@ -4504,7 +4504,7 @@ desktop_shell_set_panel(struct wl_client *client,
|
|||
struct weston_view *view, *next;
|
||||
struct shell_output *sh_output;
|
||||
|
||||
if (surface->configure) {
|
||||
if (surface->committed) {
|
||||
wl_resource_post_error(surface_resource,
|
||||
WL_DISPLAY_ERROR_INVALID_OBJECT,
|
||||
"surface role already assigned");
|
||||
|
@ -4515,8 +4515,8 @@ desktop_shell_set_panel(struct wl_client *client,
|
|||
weston_view_destroy(view);
|
||||
view = weston_view_create(surface);
|
||||
|
||||
surface->configure = panel_configure;
|
||||
surface->configure_private = shell;
|
||||
surface->committed = panel_committed;
|
||||
surface->committed_private = shell;
|
||||
weston_surface_set_label_func(surface, panel_get_label);
|
||||
surface->output = wl_resource_get_user_data(output_resource);
|
||||
view->output = surface->output;
|
||||
|
@ -4539,9 +4539,9 @@ lock_surface_get_label(struct weston_surface *surface, char *buf, size_t len)
|
|||
}
|
||||
|
||||
static void
|
||||
lock_surface_configure(struct weston_surface *surface, int32_t sx, int32_t sy)
|
||||
lock_surface_committed(struct weston_surface *surface, int32_t sx, int32_t sy)
|
||||
{
|
||||
struct desktop_shell *shell = surface->configure_private;
|
||||
struct desktop_shell *shell = surface->committed_private;
|
||||
struct weston_view *view;
|
||||
|
||||
view = container_of(surface->views.next, struct weston_view, surface_link);
|
||||
|
@ -4592,8 +4592,8 @@ desktop_shell_set_lock_surface(struct wl_client *client,
|
|||
&shell->lock_surface_listener);
|
||||
|
||||
weston_view_create(surface);
|
||||
surface->configure = lock_surface_configure;
|
||||
surface->configure_private = shell;
|
||||
surface->committed = lock_surface_committed;
|
||||
surface->committed_private = shell;
|
||||
weston_surface_set_label_func(surface, lock_surface_get_label);
|
||||
}
|
||||
|
||||
|
@ -5210,7 +5210,7 @@ activate(struct desktop_shell *shell, struct weston_view *view,
|
|||
|
||||
/* no-op func for checking black surface */
|
||||
static void
|
||||
black_surface_configure(struct weston_surface *es, int32_t sx, int32_t sy)
|
||||
black_surface_committed(struct weston_surface *es, int32_t sx, int32_t sy)
|
||||
{
|
||||
}
|
||||
|
||||
|
@ -5219,9 +5219,9 @@ is_black_surface_view(struct weston_view *view, struct weston_view **fs_view)
|
|||
{
|
||||
struct weston_surface *surface = view->surface;
|
||||
|
||||
if (surface->configure == black_surface_configure) {
|
||||
if (surface->committed == black_surface_committed) {
|
||||
if (fs_view)
|
||||
*fs_view = surface->configure_private;
|
||||
*fs_view = surface->committed_private;
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
|
@ -5779,7 +5779,7 @@ configure(struct desktop_shell *shell, struct weston_surface *surface,
|
|||
}
|
||||
|
||||
static void
|
||||
shell_surface_configure(struct weston_surface *es, int32_t sx, int32_t sy)
|
||||
shell_surface_committed(struct weston_surface *es, int32_t sx, int32_t sy)
|
||||
{
|
||||
struct shell_surface *shsurf = get_shell_surface(es);
|
||||
struct desktop_shell *shell;
|
||||
|
|
|
@ -218,7 +218,7 @@ seat_created(struct wl_listener *l, void *data)
|
|||
}
|
||||
|
||||
static void
|
||||
black_surface_configure(struct weston_surface *es, int32_t sx, int32_t sy)
|
||||
black_surface_committed(struct weston_surface *es, int32_t sx, int32_t sy)
|
||||
{
|
||||
}
|
||||
|
||||
|
@ -241,8 +241,8 @@ create_black_surface(struct weston_compositor *ec, struct fs_output *fsout,
|
|||
return NULL;
|
||||
}
|
||||
|
||||
surface->configure = black_surface_configure;
|
||||
surface->configure_private = fsout;
|
||||
surface->committed = black_surface_committed;
|
||||
surface->committed_private = fsout;
|
||||
weston_surface_set_color(surface, 0.0f, 0.0f, 0.0f, 1.0f);
|
||||
pixman_region32_fini(&surface->opaque);
|
||||
pixman_region32_init_rect(&surface->opaque, 0, 0, w, h);
|
||||
|
@ -620,10 +620,10 @@ static void
|
|||
configure_presented_surface(struct weston_surface *surface, int32_t sx,
|
||||
int32_t sy)
|
||||
{
|
||||
struct fullscreen_shell *shell = surface->configure_private;
|
||||
struct fullscreen_shell *shell = surface->committed_private;
|
||||
struct fs_output *fsout;
|
||||
|
||||
if (surface->configure != configure_presented_surface)
|
||||
if (surface->committed != configure_presented_surface)
|
||||
return;
|
||||
|
||||
wl_list_for_each(fsout, &shell->output_list, link)
|
||||
|
@ -644,8 +644,8 @@ fs_output_apply_pending(struct fs_output *fsout)
|
|||
fsout->view = NULL;
|
||||
|
||||
if (wl_list_empty(&fsout->surface->views)) {
|
||||
fsout->surface->configure = NULL;
|
||||
fsout->surface->configure_private = NULL;
|
||||
fsout->surface->committed = NULL;
|
||||
fsout->surface->committed_private = NULL;
|
||||
}
|
||||
|
||||
fsout->surface = NULL;
|
||||
|
@ -699,9 +699,9 @@ fs_output_set_surface(struct fs_output *fsout, struct weston_surface *surface,
|
|||
fs_output_clear_pending(fsout);
|
||||
|
||||
if (surface) {
|
||||
if (!surface->configure) {
|
||||
surface->configure = configure_presented_surface;
|
||||
surface->configure_private = fsout->shell;
|
||||
if (!surface->committed) {
|
||||
surface->committed = configure_presented_surface;
|
||||
surface->committed_private = fsout->shell;
|
||||
}
|
||||
|
||||
fsout->pending.surface = surface;
|
||||
|
@ -719,8 +719,8 @@ fs_output_set_surface(struct fs_output *fsout, struct weston_surface *surface,
|
|||
fsout->view = NULL;
|
||||
|
||||
if (wl_list_empty(&fsout->surface->views)) {
|
||||
fsout->surface->configure = NULL;
|
||||
fsout->surface->configure_private = NULL;
|
||||
fsout->surface->committed = NULL;
|
||||
fsout->surface->committed_private = NULL;
|
||||
}
|
||||
|
||||
fsout->surface = NULL;
|
||||
|
|
|
@ -167,9 +167,9 @@ input_panel_get_label(struct weston_surface *surface, char *buf, size_t len)
|
|||
}
|
||||
|
||||
static void
|
||||
input_panel_configure(struct weston_surface *surface, int32_t sx, int32_t sy)
|
||||
input_panel_committed(struct weston_surface *surface, int32_t sx, int32_t sy)
|
||||
{
|
||||
struct input_panel_surface *ip_surface = surface->configure_private;
|
||||
struct input_panel_surface *ip_surface = surface->committed_private;
|
||||
struct ivi_shell *shell = ip_surface->shell;
|
||||
struct weston_view *view;
|
||||
float x, y;
|
||||
|
@ -202,7 +202,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->configure = NULL;
|
||||
input_panel_surface->surface->committed = NULL;
|
||||
weston_surface_set_label_func(input_panel_surface->surface, NULL);
|
||||
weston_view_destroy(input_panel_surface->view);
|
||||
|
||||
|
@ -212,8 +212,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->configure == input_panel_configure) {
|
||||
return surface->configure_private;
|
||||
if (surface->committed == input_panel_committed) {
|
||||
return surface->committed_private;
|
||||
} else {
|
||||
return NULL;
|
||||
}
|
||||
|
@ -243,8 +243,8 @@ create_input_panel_surface(struct ivi_shell *shell,
|
|||
if (!input_panel_surface)
|
||||
return NULL;
|
||||
|
||||
surface->configure = input_panel_configure;
|
||||
surface->configure_private = input_panel_surface;
|
||||
surface->committed = input_panel_committed;
|
||||
surface->committed_private = input_panel_surface;
|
||||
weston_surface_set_label_func(surface, input_panel_get_label);
|
||||
|
||||
input_panel_surface->shell = shell;
|
||||
|
@ -329,7 +329,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->configure already set");
|
||||
"surface->committed already set");
|
||||
return;
|
||||
}
|
||||
|
||||
|
|
|
@ -78,17 +78,17 @@ struct ivi_shell_setting
|
|||
*/
|
||||
|
||||
static void
|
||||
ivi_shell_surface_configure(struct weston_surface *, int32_t, int32_t);
|
||||
ivi_shell_surface_committed(struct weston_surface *, int32_t, int32_t);
|
||||
|
||||
static struct ivi_shell_surface *
|
||||
get_ivi_shell_surface(struct weston_surface *surface)
|
||||
{
|
||||
struct ivi_shell_surface *shsurf;
|
||||
|
||||
if (surface->configure != ivi_shell_surface_configure)
|
||||
if (surface->committed != ivi_shell_surface_committed)
|
||||
return NULL;
|
||||
|
||||
shsurf = surface->configure_private;
|
||||
shsurf = surface->committed_private;
|
||||
assert(shsurf);
|
||||
assert(shsurf->surface == surface);
|
||||
|
||||
|
@ -123,7 +123,7 @@ shell_surface_send_configure(struct weston_surface *surface,
|
|||
}
|
||||
|
||||
static void
|
||||
ivi_shell_surface_configure(struct weston_surface *surface,
|
||||
ivi_shell_surface_committed(struct weston_surface *surface,
|
||||
int32_t sx, int32_t sy)
|
||||
{
|
||||
struct ivi_shell_surface *ivisurf = get_ivi_shell_surface(surface);
|
||||
|
@ -166,8 +166,8 @@ layout_surface_cleanup(struct ivi_shell_surface *ivisurf)
|
|||
ivi_layout_surface_destroy(ivisurf->layout_surface);
|
||||
ivisurf->layout_surface = NULL;
|
||||
|
||||
ivisurf->surface->configure = NULL;
|
||||
ivisurf->surface->configure_private = NULL;
|
||||
ivisurf->surface->committed = NULL;
|
||||
ivisurf->surface->committed_private = NULL;
|
||||
weston_surface_set_label_func(ivisurf->surface, NULL);
|
||||
ivisurf->surface = NULL;
|
||||
|
||||
|
@ -298,8 +298,8 @@ application_surface_create(struct wl_client *client,
|
|||
|
||||
ivisurf->surface = weston_surface;
|
||||
|
||||
weston_surface->configure = ivi_shell_surface_configure;
|
||||
weston_surface->configure_private = ivisurf;
|
||||
weston_surface->committed = ivi_shell_surface_committed;
|
||||
weston_surface->committed_private = ivisurf;
|
||||
weston_surface_set_label_func(weston_surface,
|
||||
ivi_shell_surface_get_label);
|
||||
|
||||
|
|
|
@ -2843,8 +2843,8 @@ weston_surface_commit_state(struct weston_surface *surface,
|
|||
|
||||
if (state->newly_attached || state->buffer_viewport.changed) {
|
||||
weston_surface_update_size(surface);
|
||||
if (surface->configure)
|
||||
surface->configure(surface, state->sx, state->sy);
|
||||
if (surface->committed)
|
||||
surface->committed(surface, state->sx, state->sy);
|
||||
}
|
||||
|
||||
state->sx = 0;
|
||||
|
@ -3268,7 +3268,7 @@ subsurface_get_label(struct weston_surface *surface, char *buf, size_t len)
|
|||
}
|
||||
|
||||
static void
|
||||
subsurface_configure(struct weston_surface *surface, int32_t dx, int32_t dy)
|
||||
subsurface_committed(struct weston_surface *surface, int32_t dx, int32_t dy)
|
||||
{
|
||||
struct weston_view *view;
|
||||
|
||||
|
@ -3302,8 +3302,8 @@ subsurface_configure(struct weston_surface *surface, int32_t dx, int32_t dy)
|
|||
static struct weston_subsurface *
|
||||
weston_surface_to_subsurface(struct weston_surface *surface)
|
||||
{
|
||||
if (surface->configure == subsurface_configure)
|
||||
return surface->configure_private;
|
||||
if (surface->committed == subsurface_committed)
|
||||
return surface->committed_private;
|
||||
|
||||
return NULL;
|
||||
}
|
||||
|
@ -3684,8 +3684,8 @@ weston_subsurface_destroy(struct weston_subsurface *sub)
|
|||
weston_surface_state_fini(&sub->cached);
|
||||
weston_buffer_reference(&sub->cached_buffer_ref, NULL);
|
||||
|
||||
sub->surface->configure = NULL;
|
||||
sub->surface->configure_private = NULL;
|
||||
sub->surface->committed = NULL;
|
||||
sub->surface->committed_private = NULL;
|
||||
weston_surface_set_label_func(sub->surface, NULL);
|
||||
} else {
|
||||
/* the dummy weston_subsurface for the parent itself */
|
||||
|
@ -3816,8 +3816,8 @@ subcompositor_get_subsurface(struct wl_client *client,
|
|||
return;
|
||||
}
|
||||
|
||||
surface->configure = subsurface_configure;
|
||||
surface->configure_private = sub;
|
||||
surface->committed = subsurface_committed;
|
||||
surface->committed_private = sub;
|
||||
weston_surface_set_label_func(surface, subsurface_get_label);
|
||||
}
|
||||
|
||||
|
|
|
@ -1147,8 +1147,8 @@ struct weston_surface {
|
|||
* this surface. The integer params are the sx and sy
|
||||
* parameters supplied to wl_surface::attach.
|
||||
*/
|
||||
void (*configure)(struct weston_surface *es, int32_t sx, int32_t sy);
|
||||
void *configure_private;
|
||||
void (*committed)(struct weston_surface *es, int32_t sx, int32_t sy);
|
||||
void *committed_private;
|
||||
int (*get_label)(struct weston_surface *surface, char *buf, size_t len);
|
||||
|
||||
/* Parent's list of its sub-surfaces, weston_subsurface:parent_link.
|
||||
|
|
|
@ -449,13 +449,13 @@ pointer_drag_surface_get_label(struct weston_surface *surface,
|
|||
}
|
||||
|
||||
static void
|
||||
pointer_drag_surface_configure(struct weston_surface *es,
|
||||
pointer_drag_surface_committed(struct weston_surface *es,
|
||||
int32_t sx, int32_t sy)
|
||||
{
|
||||
struct weston_pointer_drag *drag = es->configure_private;
|
||||
struct weston_pointer_drag *drag = es->committed_private;
|
||||
struct weston_pointer *pointer = drag->grab.pointer;
|
||||
|
||||
assert(es->configure == pointer_drag_surface_configure);
|
||||
assert(es->committed == pointer_drag_surface_committed);
|
||||
|
||||
drag_surface_configure(&drag->base, pointer, NULL, es, sx, sy);
|
||||
}
|
||||
|
@ -468,12 +468,12 @@ touch_drag_surface_get_label(struct weston_surface *surface,
|
|||
}
|
||||
|
||||
static void
|
||||
touch_drag_surface_configure(struct weston_surface *es, int32_t sx, int32_t sy)
|
||||
touch_drag_surface_committed(struct weston_surface *es, int32_t sx, int32_t sy)
|
||||
{
|
||||
struct weston_touch_drag *drag = es->configure_private;
|
||||
struct weston_touch_drag *drag = es->committed_private;
|
||||
struct weston_touch *touch = drag->grab.touch;
|
||||
|
||||
assert(es->configure == touch_drag_surface_configure);
|
||||
assert(es->committed == touch_drag_surface_committed);
|
||||
|
||||
drag_surface_configure(&drag->base, NULL, touch, es, sx, sy);
|
||||
}
|
||||
|
@ -610,7 +610,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->configure = NULL;
|
||||
drag->icon->surface->committed = NULL;
|
||||
weston_surface_set_label_func(drag->icon->surface, NULL);
|
||||
pixman_region32_clear(&drag->icon->surface->pending.input);
|
||||
wl_list_remove(&drag->icon_destroy_listener.link);
|
||||
|
@ -919,8 +919,8 @@ weston_pointer_start_drag(struct weston_pointer *pointer,
|
|||
wl_signal_add(&icon->destroy_signal,
|
||||
&drag->base.icon_destroy_listener);
|
||||
|
||||
icon->configure = pointer_drag_surface_configure;
|
||||
icon->configure_private = drag;
|
||||
icon->committed = pointer_drag_surface_committed;
|
||||
icon->committed_private = drag;
|
||||
weston_surface_set_label_func(icon,
|
||||
pointer_drag_surface_get_label);
|
||||
} else {
|
||||
|
@ -980,8 +980,8 @@ weston_touch_start_drag(struct weston_touch *touch,
|
|||
wl_signal_add(&icon->destroy_signal,
|
||||
&drag->base.icon_destroy_listener);
|
||||
|
||||
icon->configure = touch_drag_surface_configure;
|
||||
icon->configure_private = drag;
|
||||
icon->committed = touch_drag_surface_committed;
|
||||
icon->committed_private = drag;
|
||||
weston_surface_set_label_func(icon,
|
||||
touch_drag_surface_get_label);
|
||||
} else {
|
||||
|
|
|
@ -1002,8 +1002,8 @@ pointer_unmap_sprite(struct weston_pointer *pointer)
|
|||
weston_surface_unmap(surface);
|
||||
|
||||
wl_list_remove(&pointer->sprite_destroy_listener.link);
|
||||
surface->configure = NULL;
|
||||
surface->configure_private = NULL;
|
||||
surface->committed = NULL;
|
||||
surface->committed_private = NULL;
|
||||
weston_surface_set_label_func(surface, NULL);
|
||||
weston_view_destroy(pointer->sprite);
|
||||
pointer->sprite = NULL;
|
||||
|
@ -2262,10 +2262,10 @@ pointer_cursor_surface_get_label(struct weston_surface *surface,
|
|||
}
|
||||
|
||||
static void
|
||||
pointer_cursor_surface_configure(struct weston_surface *es,
|
||||
pointer_cursor_surface_committed(struct weston_surface *es,
|
||||
int32_t dx, int32_t dy)
|
||||
{
|
||||
struct weston_pointer *pointer = es->configure_private;
|
||||
struct weston_pointer *pointer = es->committed_private;
|
||||
int x, y;
|
||||
|
||||
if (es->width == 0)
|
||||
|
@ -2338,8 +2338,8 @@ pointer_set_cursor(struct wl_client *client, struct wl_resource *resource,
|
|||
wl_signal_add(&surface->destroy_signal,
|
||||
&pointer->sprite_destroy_listener);
|
||||
|
||||
surface->configure = pointer_cursor_surface_configure;
|
||||
surface->configure_private = pointer;
|
||||
surface->committed = pointer_cursor_surface_committed;
|
||||
surface->committed_private = pointer;
|
||||
weston_surface_set_label_func(surface,
|
||||
pointer_cursor_surface_get_label);
|
||||
pointer->sprite = weston_view_create(surface);
|
||||
|
@ -2349,7 +2349,7 @@ pointer_set_cursor(struct wl_client *client, struct wl_resource *resource,
|
|||
pointer->hotspot_y = y;
|
||||
|
||||
if (surface->buffer_ref.buffer) {
|
||||
pointer_cursor_surface_configure(surface, 0, 0);
|
||||
pointer_cursor_surface_committed(surface, 0, 0);
|
||||
weston_view_schedule_repaint(pointer->sprite);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -91,9 +91,9 @@ notify_pointer_position(struct weston_test *test, struct wl_resource *resource)
|
|||
}
|
||||
|
||||
static void
|
||||
test_surface_configure(struct weston_surface *surface, int32_t sx, int32_t sy)
|
||||
test_surface_committed(struct weston_surface *surface, int32_t sx, int32_t sy)
|
||||
{
|
||||
struct weston_test_surface *test_surface = surface->configure_private;
|
||||
struct weston_test_surface *test_surface = surface->committed_private;
|
||||
struct weston_test *test = test_surface->test;
|
||||
|
||||
if (wl_list_empty(&test_surface->view->layer_link.link))
|
||||
|
@ -118,7 +118,7 @@ move_surface(struct wl_client *client, struct wl_resource *resource,
|
|||
wl_resource_get_user_data(surface_resource);
|
||||
struct weston_test_surface *test_surface;
|
||||
|
||||
test_surface = surface->configure_private;
|
||||
test_surface = surface->committed_private;
|
||||
if (!test_surface) {
|
||||
test_surface = malloc(sizeof *test_surface);
|
||||
if (!test_surface) {
|
||||
|
@ -133,8 +133,8 @@ move_surface(struct wl_client *client, struct wl_resource *resource,
|
|||
return;
|
||||
}
|
||||
|
||||
surface->configure_private = test_surface;
|
||||
surface->configure = test_surface_configure;
|
||||
surface->committed_private = test_surface;
|
||||
surface->committed = test_surface_committed;
|
||||
}
|
||||
|
||||
test_surface->surface = surface;
|
||||
|
|
|
@ -2524,7 +2524,7 @@ xserver_map_shell_surface(struct weston_wm_window *window,
|
|||
if (!shell_interface->create_shell_surface)
|
||||
return;
|
||||
|
||||
if (window->surface->configure) {
|
||||
if (window->surface->committed) {
|
||||
weston_log("warning, unexpected in %s: "
|
||||
"surface's configure hook is already set.\n",
|
||||
__func__);
|
||||
|
|
Loading…
Reference in New Issue