From 981827ca423838a0fa422b4dd65acb1b8f81349d Mon Sep 17 00:00:00 2001 From: emersion Date: Fri, 30 Mar 2018 00:47:57 -0400 Subject: Cleanup and remove global renderer reference --- sway/server.c | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) (limited to 'sway/server.c') diff --git a/sway/server.c b/sway/server.c index 3fba019d..728e624e 100644 --- a/sway/server.c +++ b/sway/server.c @@ -1,19 +1,19 @@ #define _POSIX_C_SOURCE 200112L -#include +#include #include +#include #include #include #include #include -#include #include +#include #include #include -#include #include +#include // TODO WLR: make Xwayland optional #include -#include #include "sway/commands.h" #include "sway/config.h" #include "sway/server.h" @@ -42,11 +42,12 @@ bool server_init(struct sway_server *server) { server->wl_event_loop = wl_display_get_event_loop(server->wl_display); server->backend = wlr_backend_autocreate(server->wl_display); - server->renderer = wlr_gles2_renderer_create(server->backend); + struct wlr_renderer *renderer = wlr_backend_get_renderer(server->backend); + assert(renderer); + wl_display_init_shm(server->wl_display); - server->compositor = wlr_compositor_create( - server->wl_display, server->renderer); + server->compositor = wlr_compositor_create(server->wl_display, renderer); server->data_device_manager = wlr_data_device_manager_create(server->wl_display); @@ -95,8 +96,7 @@ bool server_init(struct sway_server *server) { } void server_fini(struct sway_server *server) { - // TODO WLR: tear down more stuff - wlr_backend_destroy(server->backend); + // TODO } void server_run(struct sway_server *server) { -- cgit v1.2.3