diff options
Diffstat (limited to 'backend/x11')
-rw-r--r-- | backend/x11/backend.c | 3 | ||||
-rw-r--r-- | backend/x11/output.c | 3 |
2 files changed, 4 insertions, 2 deletions
diff --git a/backend/x11/backend.c b/backend/x11/backend.c index 51cb5ca4..fcaab618 100644 --- a/backend/x11/backend.c +++ b/backend/x11/backend.c @@ -154,7 +154,8 @@ static int x11_event(int fd, uint32_t mask, void *data) { struct wlr_x11_backend *get_x11_backend_from_backend( struct wlr_backend *wlr_backend) { assert(wlr_backend_is_x11(wlr_backend)); - return (struct wlr_x11_backend *)wlr_backend; + struct wlr_x11_backend *backend = wl_container_of(wlr_backend, backend, backend); + return backend; } static bool backend_start(struct wlr_backend *backend) { diff --git a/backend/x11/output.c b/backend/x11/output.c index 175204fa..36ce0c4f 100644 --- a/backend/x11/output.c +++ b/backend/x11/output.c @@ -54,7 +54,8 @@ static void parse_xcb_setup(struct wlr_output *output, static struct wlr_x11_output *get_x11_output_from_output( struct wlr_output *wlr_output) { assert(wlr_output_is_x11(wlr_output)); - return (struct wlr_x11_output *)wlr_output; + struct wlr_x11_output *output = wl_container_of(wlr_output, output, wlr_output); + return output; } static bool output_set_custom_mode(struct wlr_output *wlr_output, |