mirror of
https://gitlab.freedesktop.org/wlroots/wlroots.git
synced 2025-11-14 06:59:43 -05:00
output: take wl_display in wlr_output_create_global()
Currently wlr_output holds a wl_display, but it will go away soon. Instead of relying on that field in wlr_output_create_global(), make the dependency explicit by taking a wl_display as argument.
This commit is contained in:
parent
6a7463bb8e
commit
5717e27c06
6 changed files with 11 additions and 10 deletions
|
|
@ -128,11 +128,11 @@ static void output_bind(struct wl_client *wl_client, void *data,
|
|||
wl_signal_emit_mutable(&output->events.bind, &evt);
|
||||
}
|
||||
|
||||
void wlr_output_create_global(struct wlr_output *output) {
|
||||
void wlr_output_create_global(struct wlr_output *output, struct wl_display *display) {
|
||||
if (output->global != NULL) {
|
||||
return;
|
||||
}
|
||||
output->global = wl_global_create(output->display,
|
||||
output->global = wl_global_create(display,
|
||||
&wl_output_interface, OUTPUT_VERSION, output, output_bind);
|
||||
if (output->global == NULL) {
|
||||
wlr_log(WLR_ERROR, "Failed to allocate wl_output global");
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue