libweston: delete weston_surface::get_label as unused

Signed-off-by: Pekka Paalanen <pekka.paalanen@collabora.com>
This commit is contained in:
Pekka Paalanen 2026-02-27 13:36:42 +02:00 committed by Marius Vlad
parent 78d15a6f95
commit eefcd97e2a
2 changed files with 1 additions and 27 deletions

View file

@ -1974,7 +1974,6 @@ struct weston_surface {
void (*committed)(struct weston_surface *es,
struct weston_coord_surface new_origin);
void *committed_private;
int (*get_label)(struct weston_surface *surface, char *buf, size_t len);
/** human-readable, non-unique label */
const char *label;
@ -2403,10 +2402,6 @@ weston_surface_set_role(struct weston_surface *surface,
const char *
weston_surface_get_role(struct weston_surface *surface);
void
weston_surface_set_label_func(struct weston_surface *surface,
int (*desc)(struct weston_surface *,
char *, size_t));
void
weston_surface_set_label(struct weston_surface *surface, char *label);

View file

@ -973,12 +973,6 @@ weston_surface_update_preferred_color_profile(struct weston_surface *surface)
weston_surface_send_preferred_image_description_changed(surface);
}
static int
get_label_member(struct weston_surface *surface, char *buf, size_t len)
{
return snprintf(buf, len, "%s", surface->label);
}
WL_EXPORT struct weston_surface *
weston_surface_create(struct weston_compositor *compositor,
struct weston_client *client)
@ -1004,8 +998,6 @@ weston_surface_create(struct weston_compositor *compositor,
str_printf(&surface->internal_name, "%s-%" PRIu64,
weston_client_get_internal_name(client), surface->internal_id);
surface->get_label = get_label_member;
surface->buffer_viewport.buffer.transform = WL_OUTPUT_TRANSFORM_NORMAL;
surface->buffer_viewport.buffer.scale = 1;
surface->buffer_viewport.buffer.src_width = wl_fixed_from_int(-1);
@ -5434,20 +5426,6 @@ weston_surface_get_role(struct weston_surface *surface)
return surface->role_name;
}
WL_EXPORT void
weston_surface_set_label_func(struct weston_surface *surface,
int (*desc)(struct weston_surface *,
char *, size_t))
{
if (desc)
surface->get_label = desc;
else
surface->get_label = get_label_member;
weston_timeline_refresh_subscription_objects(surface->compositor,
surface);
}
static void
weston_surface_do_set_label(struct weston_surface *surface,
char *label_dyn,
@ -5463,6 +5441,7 @@ weston_surface_do_set_label(struct weston_surface *surface,
weston_timeline_refresh_subscription_objects(surface->compositor, surface);
}
/**
* Set a human-readable label on a surface, malloc'd
*