xwayland: fix builds with xace disabled

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 <alan.coopersmith@oracle.com>
Part-of: <https://gitlab.freedesktop.org/xorg/xserver/-/merge_requests/2056>
This commit is contained in:
Alan Coopersmith 2025-08-20 13:15:17 -07:00
parent ec14ecf751
commit 48acd1ae78

View file

@ -187,6 +187,7 @@ xwl_property_callback(CallbackListPtr *pcbl, void *closure,
xwl_window_update_property(xwl_window, rec);
}
#ifdef XACE
#define readOnlyPropertyAccessMask (DixReadAccess |\
DixGetAttrAccess |\
DixListPropAccess |\
@ -213,6 +214,7 @@ xwl_access_property_callback(CallbackListPtr *pcbl, void *closure,
}
#undef readOnlyPropertyAccessMask
#endif /* XACE */
static void
xwl_root_window_finalized_callback(CallbackListPtr *pcbl,
@ -243,7 +245,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)
@ -1171,7 +1175,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);