diff --git a/src/compton.c b/src/compton.c index ec482e4..7b4e1cb 100644 --- a/src/compton.c +++ b/src/compton.c @@ -802,12 +802,13 @@ restack_win(session_t *ps, win *w, xcb_window_t new_above) { void configure_win(session_t *ps, xcb_configure_notify_event_t *ce) { // On root window changes - auto root_change_fn = backend_list[ps->o.backend]->root_change; + auto bi = backend_list[ps->o.backend]; if (ce->window == ps->root) { if (ps->o.experimental_backends) { - if (!root_change_fn) { + assert(bi); + if (!bi->root_change) { // deinit/reinit backend if the backend cannot handle root change - backend_list[ps->o.backend]->deinit(ps->backend_data, ps); + bi->deinit(ps->backend_data, ps); ps->backend_data = NULL; } } else { @@ -848,10 +849,10 @@ configure_win(session_t *ps, xcb_configure_notify_event_t *ce) { glx_on_root_change(ps); #endif if (ps->o.experimental_backends) { - if (root_change_fn) { - root_change_fn(ps->backend_data, ps); + if (bi->root_change) { + bi->root_change(ps->backend_data, ps); } else { - ps->backend_data = backend_list[ps->o.backend]->init(ps); + ps->backend_data = bi->init(ps); } } force_repaint(ps); diff --git a/src/config.h b/src/config.h index 0f31c56..5aca245 100644 --- a/src/config.h +++ b/src/config.h @@ -292,13 +292,13 @@ static inline attr_const enum backend parse_backend(const char *str) { } // Keep compatibility with an old revision containing a spelling mistake... if (!strcasecmp(str, "xr_glx_hybird")) { - log_warn("backend xr_glx_hybird should be xr_glx_hybrid, the misspelt" + log_warn("backend xr_glx_hybird should be xr_glx_hybrid, the misspelt " "version will be removed soon."); return BKEND_XR_GLX_HYBRID; } // cju wants to use dashes if (!strcasecmp(str, "xr-glx-hybrid")) { - log_warn("backend xr-glx-hybrid should be xr_glx_hybrid, the alternative" + log_warn("backend xr-glx-hybrid should be xr_glx_hybrid, the alternative " "version will be removed soon."); return BKEND_XR_GLX_HYBRID; }