}
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;
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);
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;
}
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;
if (!ipsurf) {
wl_resource_post_error(surface_resource,
WL_DISPLAY_ERROR_INVALID_OBJECT,
- "surface->configure already set");
+ "surface->committed already set");
return;
}
/* 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;
}
static bool
is_focus_surface (struct weston_surface *es)
{
- return (es->configure == focus_surface_configure);
+ return (es->committed == focus_surface_committed);
}
static bool
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);
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;
}
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,
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);
* 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);
}
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;
}
{
struct shell_surface *shsurf;
- assert(surface->configure == NULL);
+ assert(surface->committed == NULL);
shsurf = calloc(1, sizeof *shsurf);
if (!shsurf) {
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;
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);
}
}
}
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);
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");
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;
}
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);
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");
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;
}
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);
&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);
}
/* 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)
{
}
{
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;
}
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;
}
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)
{
}
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);
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)
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;
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;
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;
}
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;
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);
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;
}
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;
if (!ipsurf) {
wl_resource_post_error(surface_resource,
WL_DISPLAY_ERROR_INVALID_OBJECT,
- "surface->configure already set");
+ "surface->committed already set");
return;
}
*/
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);
}
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);
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;
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);
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;
}
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;
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;
}
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 */
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);
}
* 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.
}
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);
}
}
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);
}
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);
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 {
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 {
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;
}
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)
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);
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);
}
}
}
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))
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) {
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;
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__);