fix: update to wlroot 0.18

This commit is contained in:
DanyLE
2025-07-02 22:54:16 +02:00
parent 964d22b22c
commit c1393a1366
5 changed files with 42 additions and 43 deletions

11
diyac.c
View File

@@ -95,7 +95,7 @@ int main(int argc, char *argv[])
* output hardware. The autocreate option will choose the most suitable
* backend based on the current environment, such as opening an X11 window
* if an X11 server is running. */
server.backend = wlr_backend_autocreate(server.wl_display, NULL);
server.backend = wlr_backend_autocreate(server.wl_event_loop, NULL);
if (server.backend == NULL)
{
wlr_log(WLR_ERROR, "failed to create wlr_backend");
@@ -151,7 +151,7 @@ int main(int argc, char *argv[])
/* Creates an output layout, which a wlroots utility for working with an
* arrangement of screens in a physical layout. */
server.output_layout = wlr_output_layout_create();
server.output_layout = wlr_output_layout_create(server.wl_display);
/* Configure a listener to be notified when new outputs are available on the
* backend. */
@@ -180,9 +180,9 @@ int main(int argc, char *argv[])
server.xdg_popup_tree = wlr_scene_tree_create(&server.scene->tree);
server.xdg_shell = wlr_xdg_shell_create(server.wl_display, 6);
server.new_xdg_surface.notify = diyac_new_xdg_surface;
wl_signal_add(&server.xdg_shell->events.new_surface,
&server.new_xdg_surface);
server.new_xdg_toplevel.notify = diyac_new_xdg_toplevel;
wl_signal_add(&server.xdg_shell->events.new_toplevel,
&server.new_xdg_toplevel);
server.layer_shell = wlr_layer_shell_v1_create(server.wl_display, 4);
server.new_layer_surface.notify = diyac_new_layer_surface;
@@ -263,6 +263,7 @@ int main(int argc, char *argv[])
{
wl_event_source_remove(server.proc_mon);
}
// TODO remove all event listeners
wl_display_destroy_clients(server.wl_display);
// wlr_scene_node_destroy(&server.scene->tree.node);
wlr_xcursor_manager_destroy(server.seat.cursor_mgr);