From eefcd97e2a131e63ddd7a852eca1efa00f4e4a0f Mon Sep 17 00:00:00 2001 From: Pekka Paalanen Date: Fri, 27 Feb 2026 13:36:42 +0200 Subject: [PATCH] libweston: delete weston_surface::get_label as unused Signed-off-by: Pekka Paalanen --- include/libweston/libweston.h | 5 ----- libweston/compositor.c | 23 +---------------------- 2 files changed, 1 insertion(+), 27 deletions(-) diff --git a/include/libweston/libweston.h b/include/libweston/libweston.h index 58d6b24d7..4a4c5a44e 100644 --- a/include/libweston/libweston.h +++ b/include/libweston/libweston.h @@ -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); diff --git a/libweston/compositor.c b/libweston/compositor.c index 46dcbf9c5..5177fd1ec 100644 --- a/libweston/compositor.c +++ b/libweston/compositor.c @@ -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 *