summaryrefslogtreecommitdiff
path: root/src/platform/wayland/backend.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/platform/wayland/backend.c')
-rw-r--r--src/platform/wayland/backend.c14
1 files changed, 9 insertions, 5 deletions
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 = {