From 3298b0a3e021efc99e4a7892ce4b176bc5e7d556 Mon Sep 17 00:00:00 2001 From: Alan Coopersmith Date: Wed, 20 Aug 2025 13:15:17 -0700 Subject: [PATCH] xwayland: fix builds with xace disabled MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit CI meson-disable-options builds were failing with: ../hw/xwayland/xwayland-screen.c: In function ‘xwl_close_screen’: ../hw/xwayland/xwayland-screen.c:246:5: error: implicit declaration of function ‘XaceDeleteCallback’; did you mean ‘DeleteCallback’? [-Werror=implicit-function-declaration] 246 | XaceDeleteCallback(XACE_PROPERTY_ACCESS, xwl_access_property_callback, screen); | ^~~~~~~~~~~~~~~~~~ | DeleteCallback ../hw/xwayland/xwayland-screen.c:246:24: error: ‘XACE_PROPERTY_ACCESS’ undeclared (first use in this function) 246 | XaceDeleteCallback(XACE_PROPERTY_ACCESS, xwl_access_property_callback, screen); | ^~~~~~~~~~~~~~~~~~~~ ../hw/xwayland/xwayland-screen.c: In function ‘xwl_screen_init’: ../hw/xwayland/xwayland-screen.c:1174:5: error: implicit declaration of function ‘XaceRegisterCallback’ [-Werror=implicit-function-declaration] 1174 | XaceRegisterCallback(XACE_PROPERTY_ACCESS, xwl_access_property_callback, pScreen); | ^~~~~~~~~~~~~~~~~~~~ ../hw/xwayland/xwayland-screen.c:1174:26: error: ‘XACE_PROPERTY_ACCESS’ undeclared (first use in this function) 1174 | XaceRegisterCallback(XACE_PROPERTY_ACCESS, xwl_access_property_callback, pScreen); | ^~~~~~~~~~~~~~~~~~~~ Fixes: a07c2cda9 ("xwayland: Add an XACE property access handler") Signed-off-by: Alan Coopersmith Part-of: (cherry picked from commit 48acd1ae7835c2e95c7f2db704b1f22dcba4efdd) --- hw/xwayland/xwayland-screen.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/hw/xwayland/xwayland-screen.c b/hw/xwayland/xwayland-screen.c index f2b437127..74ea06610 100644 --- a/hw/xwayland/xwayland-screen.c +++ b/hw/xwayland/xwayland-screen.c @@ -184,6 +184,7 @@ xwl_property_callback(CallbackListPtr *pcbl, void *closure, xwl_window_update_property(xwl_window, rec); } +#ifdef XACE #define readOnlyPropertyAccessMask (DixReadAccess |\ DixGetAttrAccess |\ DixListPropAccess |\ @@ -210,6 +211,7 @@ xwl_access_property_callback(CallbackListPtr *pcbl, void *closure, } #undef readOnlyPropertyAccessMask +#endif /* XACE */ static void xwl_root_window_finalized_callback(CallbackListPtr *pcbl, @@ -240,7 +242,9 @@ xwl_close_screen(ScreenPtr screen) xwl_dmabuf_feedback_destroy(&xwl_screen->default_feedback); #endif DeleteCallback(&PropertyStateCallback, xwl_property_callback, screen); +#ifdef XACE XaceDeleteCallback(XACE_PROPERTY_ACCESS, xwl_access_property_callback, screen); +#endif xorg_list_for_each_entry_safe(xwl_output, next_xwl_output, &xwl_screen->output_list, link) @@ -1168,7 +1172,9 @@ xwl_screen_init(ScreenPtr pScreen, int argc, char **argv) AddCallback(&PropertyStateCallback, xwl_property_callback, pScreen); AddCallback(&RootWindowFinalizeCallback, xwl_root_window_finalized_callback, pScreen); +#ifdef XACE XaceRegisterCallback(XACE_PROPERTY_ACCESS, xwl_access_property_callback, pScreen); +#endif xwl_screen_setup_custom_vector(xwl_screen);