Port 0.16 wlr_output_layout_get_box changes

Fixes memory leaks.
This commit is contained in:
Alexander Orzechowski 2022-10-12 04:05:33 -04:00 committed by Jente Hidskes Ankarberg
parent 5818a32a99
commit 979ff58a24
3 changed files with 17 additions and 13 deletions

5
cage.c
View file

@ -536,8 +536,9 @@ main(int argc, char *argv[])
}
/* Place the cursor in the center of the output layout. */
struct wlr_box *layout_box = wlr_output_layout_get_box(server.output_layout, NULL);
wlr_cursor_warp(server.seat->cursor, NULL, layout_box->width / 2, layout_box->height / 2);
struct wlr_box layout_box;
wlr_output_layout_get_box(server.output_layout, NULL, &layout_box);
wlr_cursor_warp(server.seat->cursor, NULL, layout_box.width / 2, layout_box.height / 2);
wl_display_run(server.wl_display);