aboutsummaryrefslogtreecommitdiff
path: root/backend/drm/backend.c
diff options
context:
space:
mode:
Diffstat (limited to 'backend/drm/backend.c')
-rw-r--r--backend/drm/backend.c7
1 files changed, 6 insertions, 1 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 = {