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:
Quentin Glidic
2016-08-12 10:41:33 +02:00
parent cde1345d69
commit 2edc3d5462
11 changed files with 107 additions and 107 deletions
+9 -9
View File
@@ -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);
}
+2 -2
View File
@@ -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.
+11 -11
View File
@@ -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 {
+7 -7
View File
@@ -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);
}
}