mirror of
https://github.com/cage-kiosk/cage.git
synced 2025-10-29 05:40:19 -04:00
cage: create backend with wl_event_loop and output layout with wl_display
This commit is contained in:
parent
47ea6a5d68
commit
b9add8b729
1 changed files with 2 additions and 3 deletions
5
cage.c
5
cage.c
|
|
@ -294,7 +294,7 @@ main(int argc, char *argv[])
|
||||||
struct wl_event_source *sigterm_source =
|
struct wl_event_source *sigterm_source =
|
||||||
wl_event_loop_add_signal(event_loop, SIGTERM, handle_signal, server.wl_display);
|
wl_event_loop_add_signal(event_loop, SIGTERM, handle_signal, server.wl_display);
|
||||||
|
|
||||||
server.backend = wlr_backend_autocreate(server.wl_display, &server.session);
|
server.backend = wlr_backend_autocreate(event_loop, &server.session);
|
||||||
if (!server.backend) {
|
if (!server.backend) {
|
||||||
wlr_log(WLR_ERROR, "Unable to create the wlroots backend");
|
wlr_log(WLR_ERROR, "Unable to create the wlroots backend");
|
||||||
ret = 1;
|
ret = 1;
|
||||||
|
|
@ -325,7 +325,7 @@ main(int argc, char *argv[])
|
||||||
wl_list_init(&server.views);
|
wl_list_init(&server.views);
|
||||||
wl_list_init(&server.outputs);
|
wl_list_init(&server.outputs);
|
||||||
|
|
||||||
server.output_layout = wlr_output_layout_create();
|
server.output_layout = wlr_output_layout_create(server.wl_display);
|
||||||
if (!server.output_layout) {
|
if (!server.output_layout) {
|
||||||
wlr_log(WLR_ERROR, "Unable to create output layout");
|
wlr_log(WLR_ERROR, "Unable to create output layout");
|
||||||
ret = 1;
|
ret = 1;
|
||||||
|
|
@ -596,6 +596,5 @@ end:
|
||||||
/* This function is not null-safe, but we only ever get here
|
/* This function is not null-safe, but we only ever get here
|
||||||
with a proper wl_display. */
|
with a proper wl_display. */
|
||||||
wl_display_destroy(server.wl_display);
|
wl_display_destroy(server.wl_display);
|
||||||
wlr_output_layout_destroy(server.output_layout);
|
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue