/* 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;