diff options
Diffstat (limited to 'backend/drm')
-rw-r--r-- | backend/drm/backend.c | 3 | ||||
-rw-r--r-- | backend/drm/drm.c | 3 |
2 files changed, 4 insertions, 2 deletions
diff --git a/backend/drm/backend.c b/backend/drm/backend.c index b3af3005..54852185 100644 --- a/backend/drm/backend.c +++ b/backend/drm/backend.c @@ -16,7 +16,8 @@ struct wlr_drm_backend *get_drm_backend_from_backend( struct wlr_backend *wlr_backend) { assert(wlr_backend_is_drm(wlr_backend)); - return (struct wlr_drm_backend *)wlr_backend; + struct wlr_drm_backend *backend = wl_container_of(wlr_backend, backend, backend); + return backend; } static bool backend_start(struct wlr_backend *backend) { diff --git a/backend/drm/drm.c b/backend/drm/drm.c index 5f71f923..fdbab3bf 100644 --- a/backend/drm/drm.c +++ b/backend/drm/drm.c @@ -331,7 +331,8 @@ void finish_drm_resources(struct wlr_drm_backend *drm) { static struct wlr_drm_connector *get_drm_connector_from_output( struct wlr_output *wlr_output) { assert(wlr_output_is_drm(wlr_output)); - return (struct wlr_drm_connector *)wlr_output; + struct wlr_drm_connector *conn = wl_container_of(wlr_output, conn, output); + return conn; } static void layer_handle_addon_destroy(struct wlr_addon *addon) { |