From ca08bf599fce2c73824a74d35f9618dcb2410bbe Mon Sep 17 00:00:00 2001 From: Dudemanguy Date: Mon, 12 Jun 2023 14:34:50 -0500 Subject: wayland: bump wayland-protocols to 1.25 1.27 would have been nicer but ubuntu 22.04 is on 1.25 so we'll just compromise. --- video/out/wayland_common.c | 12 ------------ video/out/wayland_common.h | 3 +-- 2 files changed, 1 insertion(+), 14 deletions(-) (limited to 'video/out') diff --git a/video/out/wayland_common.c b/video/out/wayland_common.c index 618ec39f0e..a2ef5400ee 100644 --- a/video/out/wayland_common.c +++ b/video/out/wayland_common.c @@ -800,7 +800,6 @@ static void surface_handle_leave(void *data, struct wl_surface *wl_surface, } #ifdef HAVE_WAYLAND_1_22 - static void surface_handle_preferred_buffer_scale(void *data, struct wl_surface *wl_surface, int32_t scale) @@ -828,7 +827,6 @@ static void surface_handle_preferred_buffer_transform(void *data, uint32_t transform) { } - #endif static const struct wl_surface_listener surface_listener = { @@ -987,7 +985,6 @@ static void handle_toplevel_close(void *data, struct xdg_toplevel *xdg_toplevel) mp_input_put_key(wl->vo->input_ctx, MP_KEY_CLOSE_WIN); } -#ifdef XDG_TOPLEVEL_CONFIGURE_BOUNDS_SINCE_VERSION static void handle_configure_bounds(void *data, struct xdg_toplevel *xdg_toplevel, int32_t width, int32_t height) { @@ -995,14 +992,11 @@ static void handle_configure_bounds(void *data, struct xdg_toplevel *xdg_topleve wl->bounded_width = width * wl->scaling; wl->bounded_height = height * wl->scaling; } -#endif static const struct xdg_toplevel_listener xdg_toplevel_listener = { handle_toplevel_config, handle_toplevel_close, -#ifdef XDG_TOPLEVEL_CONFIGURE_BOUNDS_SINCE_VERSION handle_configure_bounds, -#endif }; #if HAVE_WAYLAND_PROTOCOLS_1_31 @@ -1176,7 +1170,6 @@ static const struct zwp_linux_dmabuf_v1_listener dmabuf_listener = { dmabuf_format }; -#if HAVE_WAYLAND_PROTOCOLS_1_24 static void done(void *data, struct zwp_linux_dmabuf_feedback_v1 *zwp_linux_dmabuf_feedback_v1) { @@ -1236,7 +1229,6 @@ static const struct zwp_linux_dmabuf_feedback_v1_listener dmabuf_feedback_listen tranche_formats, tranche_flags, }; -#endif static void registry_handle_add(void *data, struct wl_registry *reg, uint32_t id, const char *interface, uint32_t ver) @@ -1267,10 +1259,8 @@ static void registry_handle_add(void *data, struct wl_registry *reg, uint32_t id if (!strcmp (interface, zwp_linux_dmabuf_v1_interface.name) && (ver >= 4) && found++) { wl->dmabuf = wl_registry_bind(reg, id, &zwp_linux_dmabuf_v1_interface, 4); -#if HAVE_WAYLAND_PROTOCOLS_1_24 wl->dmabuf_feedback = zwp_linux_dmabuf_v1_get_default_feedback(wl->dmabuf); zwp_linux_dmabuf_feedback_v1_add_listener(wl->dmabuf_feedback, &dmabuf_feedback_listener, wl); -#endif } else if (!strcmp (interface, zwp_linux_dmabuf_v1_interface.name) && (ver >= 2) && found++) { wl->dmabuf = wl_registry_bind(reg, id, &zwp_linux_dmabuf_v1_interface, 2); zwp_linux_dmabuf_v1_add_listener(wl->dmabuf, &dmabuf_listener, wl); @@ -2397,10 +2387,8 @@ void vo_wayland_uninit(struct vo *vo) if (wl->dmabuf) zwp_linux_dmabuf_v1_destroy(wl->dmabuf); -#if HAVE_WAYLAND_PROTOCOLS_1_24 if (wl->dmabuf_feedback) zwp_linux_dmabuf_feedback_v1_destroy(wl->dmabuf_feedback); -#endif if (wl->seat) wl_seat_destroy(wl->seat); diff --git a/video/out/wayland_common.h b/video/out/wayland_common.h index d22e91d5e5..a524c530fa 100644 --- a/video/out/wayland_common.h +++ b/video/out/wayland_common.h @@ -99,8 +99,7 @@ struct vo_wayland_state { /* linux-dmabuf */ struct zwp_linux_dmabuf_v1 *dmabuf; - /* TODO: unvoid this if required wayland protocols is bumped to 1.24+ */ - void *dmabuf_feedback; + struct zwp_linux_dmabuf_feedback_v1 *dmabuf_feedback; wayland_format *format_map; uint32_t format_size; bool using_dmabuf_wayland; -- cgit v1.2.3