diff options
-rw-r--r-- | backend/drm/backend.c | 7 | ||||
-rw-r--r-- | backend/multi/backend.c | 2 |
2 files changed, 7 insertions, 2 deletions
diff --git a/backend/drm/backend.c b/backend/drm/backend.c index 5833d46e..1df5cdd1 100644 --- a/backend/drm/backend.c +++ b/backend/drm/backend.c @@ -51,7 +51,12 @@ static void backend_destroy(struct wlr_backend *backend) { static struct wlr_renderer *backend_get_renderer( struct wlr_backend *backend) { struct wlr_drm_backend *drm = (struct wlr_drm_backend *)backend; - return drm->renderer.wlr_rend; + + if (drm->parent) { + return drm->parent->renderer.wlr_rend; + } else { + return drm->renderer.wlr_rend; + } } static struct wlr_backend_impl backend_impl = { diff --git a/backend/multi/backend.c b/backend/multi/backend.c index f1d50347..e0038955 100644 --- a/backend/multi/backend.c +++ b/backend/multi/backend.c @@ -143,7 +143,7 @@ bool wlr_multi_backend_add(struct wlr_backend *_multi, struct wlr_renderer *multi_renderer = multi_backend_get_renderer(&multi->backend); struct wlr_renderer *backend_renderer = wlr_backend_get_renderer(backend); - if (multi_renderer != NULL && backend_renderer != NULL) { + if (multi_renderer != NULL && backend_renderer != NULL && multi_renderer != backend_renderer) { wlr_log(WLR_ERROR, "Could not add backend: multiple renderers at the " "same time aren't supported"); return false; |