From 6a7463bb8e29c55b906dd66e2ce3625dcccbd3f4 Mon Sep 17 00:00:00 2001 From: Simon Ser Date: Sat, 12 Aug 2023 08:24:08 +0200 Subject: output-layout: take wl_display in constructor The output layout creates and destroys wl_output globals. We will soon need the wl_display to do so. --- examples/fullscreen-shell.c | 2 +- examples/output-layout.c | 3 +-- examples/pointer.c | 3 +-- 3 files changed, 3 insertions(+), 5 deletions(-) (limited to 'examples') diff --git a/examples/fullscreen-shell.c b/examples/fullscreen-shell.c index 5c36b8b1..afc3c876 100644 --- a/examples/fullscreen-shell.c +++ b/examples/fullscreen-shell.c @@ -221,7 +221,7 @@ int main(int argc, char *argv[]) { wlr_compositor_create(server.wl_display, 5, server.renderer); - server.output_layout = wlr_output_layout_create(); + server.output_layout = wlr_output_layout_create(server.wl_display); wl_list_init(&server.outputs); server.new_output.notify = server_handle_new_output; diff --git a/examples/output-layout.c b/examples/output-layout.c index de5217e4..7d02dc9c 100644 --- a/examples/output-layout.c +++ b/examples/output-layout.c @@ -273,7 +273,7 @@ int main(int argc, char *argv[]) { .display = display, }; - state.layout = wlr_output_layout_create(); + state.layout = wlr_output_layout_create(display); clock_gettime(CLOCK_MONOTONIC, &state.ts_last); struct wlr_backend *wlr = wlr_backend_autocreate(display, NULL); @@ -303,5 +303,4 @@ int main(int argc, char *argv[]) { wlr_texture_destroy(state.cat_texture); wl_display_destroy(state.display); - wlr_output_layout_destroy(state.layout); } diff --git a/examples/pointer.c b/examples/pointer.c index 5d9de33b..3600dc7b 100644 --- a/examples/pointer.c +++ b/examples/pointer.c @@ -351,7 +351,7 @@ int main(int argc, char *argv[]) { state.allocator = wlr_allocator_autocreate(wlr, state.renderer); state.cursor = wlr_cursor_create(); - state.layout = wlr_output_layout_create(); + state.layout = wlr_output_layout_create(display); wlr_cursor_attach_output_layout(state.cursor, state.layout); //wlr_cursor_map_to_region(state.cursor, state.config->cursor.mapped_box); wl_list_init(&state.devices); @@ -415,5 +415,4 @@ int main(int argc, char *argv[]) { wlr_xcursor_manager_destroy(state.xcursor_manager); wlr_cursor_destroy(state.cursor); - wlr_output_layout_destroy(state.layout); } -- cgit v1.2.3