mirror of
https://gitlab.freedesktop.org/wlroots/wlroots.git
synced 2025-12-16 08:56:26 -05:00
Remove WLR_HAS_XCB_ERRORS
wlroots' dependency on this library doesn't change the features exposed to compositors. It's purely a wlroots implementation detail. Thus downstream compositors shouldn't really care about it. Introduce an "internal_features" dictionary to store the status of such internal dependencies.
This commit is contained in:
parent
78befa59f9
commit
1eb38e0015
7 changed files with 26 additions and 20 deletions
|
|
@ -191,7 +191,7 @@ static void backend_destroy(struct wlr_backend *backend) {
|
|||
wlr_drm_format_set_finish(&x11->dri3_formats);
|
||||
free(x11->drm_format);
|
||||
|
||||
#if WLR_HAS_XCB_ERRORS
|
||||
#if HAS_XCB_ERRORS
|
||||
xcb_errors_context_free(x11->errors_context);
|
||||
#endif
|
||||
|
||||
|
|
@ -617,7 +617,7 @@ struct wlr_backend *wlr_x11_backend_create(struct wl_display *display,
|
|||
return false;
|
||||
}
|
||||
|
||||
#if WLR_HAS_XCB_ERRORS
|
||||
#if HAS_XCB_ERRORS
|
||||
if (xcb_errors_context_new(x11->xcb, &x11->errors_context) != 0) {
|
||||
wlr_log(WLR_ERROR, "Failed to create error context");
|
||||
return false;
|
||||
|
|
@ -663,7 +663,7 @@ error_x11:
|
|||
}
|
||||
|
||||
static void handle_x11_error(struct wlr_x11_backend *x11, xcb_value_error_t *ev) {
|
||||
#if WLR_HAS_XCB_ERRORS
|
||||
#if HAS_XCB_ERRORS
|
||||
const char *major_name = xcb_errors_get_name_for_major_code(
|
||||
x11->errors_context, ev->major_opcode);
|
||||
if (!major_name) {
|
||||
|
|
@ -701,7 +701,7 @@ log_raw:
|
|||
|
||||
static void handle_x11_unknown_event(struct wlr_x11_backend *x11,
|
||||
xcb_generic_event_t *ev) {
|
||||
#if WLR_HAS_XCB_ERRORS
|
||||
#if HAS_XCB_ERRORS
|
||||
const char *extension;
|
||||
const char *event_name = xcb_errors_get_name_for_xcb_event(
|
||||
x11->errors_context, ev, &extension);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue