aboutsummaryrefslogtreecommitdiff
path: root/examples
diff options
context:
space:
mode:
authorSimon Ser <contact@emersion.fr>2023-08-12 08:24:08 +0200
committerIsaac Freund <mail@isaacfreund.com>2023-11-23 11:39:25 +0000
commit6a7463bb8e29c55b906dd66e2ce3625dcccbd3f4 (patch)
tree11e408582c20af68bc6159ac325cb1da6ab354b2 /examples
parent63792b38e46ae1741a6492d3c0183cb9566e4c9f (diff)
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.
Diffstat (limited to 'examples')
-rw-r--r--examples/fullscreen-shell.c2
-rw-r--r--examples/output-layout.c3
-rw-r--r--examples/pointer.c3
3 files changed, 3 insertions, 5 deletions
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);
}