diff options
Diffstat (limited to 'backend/headless')
-rw-r--r-- | backend/headless/backend.c | 3 | ||||
-rw-r--r-- | backend/headless/output.c | 3 |
2 files changed, 4 insertions, 2 deletions
diff --git a/backend/headless/backend.c b/backend/headless/backend.c index df14d6af..f0cde0c7 100644 --- a/backend/headless/backend.c +++ b/backend/headless/backend.c @@ -7,7 +7,8 @@ struct wlr_headless_backend *headless_backend_from_backend( struct wlr_backend *wlr_backend) { assert(wlr_backend_is_headless(wlr_backend)); - return (struct wlr_headless_backend *)wlr_backend; + struct wlr_headless_backend *backend = wl_container_of(wlr_backend, backend, backend); + return backend; } static bool backend_start(struct wlr_backend *wlr_backend) { diff --git a/backend/headless/output.c b/backend/headless/output.c index db7b707f..9cac54d1 100644 --- a/backend/headless/output.c +++ b/backend/headless/output.c @@ -17,7 +17,8 @@ static size_t last_output_num = 0; static struct wlr_headless_output *headless_output_from_output( struct wlr_output *wlr_output) { assert(wlr_output_is_headless(wlr_output)); - return (struct wlr_headless_output *)wlr_output; + struct wlr_headless_output *output = wl_container_of(wlr_output, output, wlr_output); + return output; } static bool output_set_custom_mode(struct wlr_headless_output *output, |