From 339e1ad7adb8340732ee856d0f6f0d2c7f1455d1 Mon Sep 17 00:00:00 2001 From: Berke Güzel Date: Tue, 13 Oct 2026 14:14:28 +0300 Subject: Inline trivial internal helpers at their call sites --- src/platform/wayland/backend.c | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) (limited to 'src/platform/wayland/backend.c') diff --git a/src/platform/wayland/backend.c b/src/platform/wayland/backend.c index c0c7c83..3eada38 100644 --- a/src/platform/wayland/backend.c +++ b/src/platform/wayland/backend.c @@ -76,7 +76,8 @@ static void impl_surface_destroy(struct yasl_surface *s) static struct yasl_display *impl_surface_display(const struct yasl_surface *s) { - struct wayland_display *result = wayland_surface_display((const struct wayland_surface *)s); + const struct wayland_surface *w = (const struct wayland_surface *)s; + struct wayland_display *result = w ? w->conn : NULL; return result ? &result->base : NULL; } @@ -122,7 +123,7 @@ static struct yasl_timing impl_surface_timing(const struct yasl_surface *s) static uint64_t impl_surface_frame_time_ns(struct yasl_surface *s, uint64_t now) { - return wayland_surface_frame_time_ns((struct wayland_surface *)s, now); + return yasl_clock_frame_timestamp_ns(&((struct wayland_surface *)s)->clock, now); } static void impl_surface_set_cursor(struct yasl_surface *s, enum yasl_cursor cursor) @@ -137,7 +138,8 @@ static void impl_surface_set_background_color(struct yasl_surface *s, uint32_t b static const char *impl_surface_ime_preedit(const struct yasl_surface *s) { - return wayland_surface_ime_preedit((const struct wayland_surface *)s); + const struct wayland_surface *w = (const struct wayland_surface *)s; + return w ? w->ime_shown : NULL; } static bool impl_surface_ime_preedit_cursor(const struct yasl_surface *s, int *begin, int *end) @@ -177,12 +179,14 @@ static bool impl_surface_place_under_pointer(struct yasl_surface *s, struct yasl static void *impl_display_get_native_handle(struct yasl_display *d) { - return wayland_display_get_native_handle((struct wayland_display *)d); + struct wayland_display *w = (struct wayland_display *)d; + return w ? w->wl : NULL; } static void *impl_surface_get_native_handle(struct yasl_surface *s) { - return wayland_surface_get_native_handle((struct wayland_surface *)s); + struct wayland_surface *w = (struct wayland_surface *)s; + return w ? w->surface : NULL; } const struct yasl_backend_ops yasl_wayland_backend = { -- cgit v1.2.3