xcb errors: init errors context at start

`xcb_errors_context_new` is more than just a malloc, it does a few
xcb requests so we benefit from not generating a new context everytime
This commit is contained in:
Dominique Martinet 2018-03-03 17:06:27 +01:00
parent 7d1870c6f1
commit d9a724c4a2
2 changed files with 22 additions and 23 deletions

View file

@ -105,6 +105,9 @@ struct wlr_xwm {
struct wl_list unpaired_surfaces; // wlr_xwayland_surface::unpaired_link
const xcb_query_extension_reply_t *xfixes;
#ifdef WLR_HAS_XCB_ERRORS
xcb_errors_context_t *errors_context;
#endif
struct wl_listener compositor_new_surface;
struct wl_listener compositor_destroy;