From 50bb98fba58e50e250ce035d8fd8da8345b0ab7a Mon Sep 17 00:00:00 2001 From: Campbell Barton Date: Wed, 19 Jun 2024 19:34:49 +1000 Subject: [PATCH] Fix #123339: Blender fails to build with older versions of wayland Follow up to [0] which only addressed one of the issues. [0]: bc7cb481dab9d0f9c22d4c59e90930be9a3a6511 --- intern/ghost/intern/GHOST_SystemWayland.cc | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/intern/ghost/intern/GHOST_SystemWayland.cc b/intern/ghost/intern/GHOST_SystemWayland.cc index a3b6b2d8a96..6f0c26474bf 100644 --- a/intern/ghost/intern/GHOST_SystemWayland.cc +++ b/intern/ghost/intern/GHOST_SystemWayland.cc @@ -3676,6 +3676,8 @@ static void cursor_surface_handle_preferred_buffer_scale(void * /*data*/, CLOG_INFO(LOG, 2, "handle_preferred_buffer_scale (factor=%d)", factor); } +#if defined(WL_SURFACE_PREFERRED_BUFFER_SCALE_SINCE_VERSION) && \ + defined(WL_SURFACE_PREFERRED_BUFFER_TRANSFORM_SINCE_VERSION) static void cursor_surface_handle_preferred_buffer_transform(void * /*data*/, wl_surface * /*wl_surface*/, uint32_t transform) @@ -3683,12 +3685,17 @@ static void cursor_surface_handle_preferred_buffer_transform(void * /*data*/, /* Only available in interface version 6. */ CLOG_INFO(LOG, 2, "handle_preferred_buffer_transform (transform=%u)", transform); } +#endif /* WL_SURFACE_PREFERRED_BUFFER_SCALE_SINCE_VERSION && \ + * WL_SURFACE_PREFERRED_BUFFER_TRANSFORM_SINCE_VERSION */ static const wl_surface_listener cursor_surface_listener = { /*enter*/ cursor_surface_handle_enter, /*leave*/ cursor_surface_handle_leave, +#if defined(WL_SURFACE_PREFERRED_BUFFER_SCALE_SINCE_VERSION) && \ + defined(WL_SURFACE_PREFERRED_BUFFER_TRANSFORM_SINCE_VERSION) /*preferred_buffer_scale*/ cursor_surface_handle_preferred_buffer_scale, /*preferred_buffer_transform*/ cursor_surface_handle_preferred_buffer_transform, +#endif }; #undef LOG