output: set pointer to cg_output in wlr_output->data

This will be used later in the layer shell implementation.
This commit is contained in:
Jente Hidskes 2020-02-24 20:07:36 +01:00
parent 3321daef98
commit 1ccbacf198

View file

@ -1,7 +1,7 @@
/*
* Cage: A Wayland kiosk.
*
* Copyright (C) 2018-2020 Jente Hidskes
* Copyright (C) 2018-2021 Jente Hidskes
* Copyright (C) 2019 The Sway authors
*
* See the LICENSE file accompanying this file.
@ -138,6 +138,8 @@ output_destroy(struct cg_output *output)
{
struct cg_server *server = output->server;
output->wlr_output->data = NULL;
wl_list_remove(&output->destroy.link);
wl_list_remove(&output->commit.link);
wl_list_remove(&output->mode.link);
@ -188,6 +190,7 @@ handle_new_output(struct wl_listener *listener, void *data)
}
output->wlr_output = wlr_output;
wlr_output->data = output;
output->server = server;
wl_list_insert(&server->outputs, &output->link);