From 3273f749ea86d3e7178955a0771d6783deae20e4 Mon Sep 17 00:00:00 2001 From: Palanix Date: Sat, 21 Aug 2021 01:53:38 +0200 Subject: [PATCH 1/4] wlr_layer_surface_v1_close has been replaced by wlr_layer_surface_v1_destroy --- dwl.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dwl.c b/dwl.c index a2a0b69..3b06948 100644 --- a/dwl.c +++ b/dwl.c @@ -553,7 +553,7 @@ arrangelayer(Monitor *m, struct wl_list *list, struct wlr_box *usable_area, int box.y -= state->margin.bottom; } if (box.width < 0 || box.height < 0) { - wlr_layer_surface_v1_close(wlr_layer_surface); + wlr_layer_surface_v1_destroy(wlr_layer_surface); continue; } layersurface->geo = box; From 1e1482adcb3bad768c51b47db9bd86b9e54a9001 Mon Sep 17 00:00:00 2001 From: Leonardo Hernandez Hernandez Date: Fri, 24 Sep 2021 16:12:12 -0500 Subject: [PATCH 2/4] client_pending has been renamed as pending in wlr_layer_surface_v1 as seen in swaywm/wlroots@59fa363 --- dwl.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/dwl.c b/dwl.c index a876e8c..4a58770 100644 --- a/dwl.c +++ b/dwl.c @@ -930,13 +930,13 @@ createlayersurface(struct wl_listener *listener, void *data) wlr_layer_surface->data = layersurface; m = wlr_layer_surface->output->data; - wl_list_insert(&m->layers[wlr_layer_surface->client_pending.layer], + wl_list_insert(&m->layers[wlr_layer_surface->pending.layer], &layersurface->link); - // Temporarily set the layer's current state to client_pending + // Temporarily set the layer's current state to pending // so that we can easily arrange it old_state = wlr_layer_surface->current; - wlr_layer_surface->current = wlr_layer_surface->client_pending; + wlr_layer_surface->current = wlr_layer_surface->pending; arrangelayers(m); wlr_layer_surface->current = old_state; } From 52dbc97ed69f368e63fae57b028072f01d07ee7d Mon Sep 17 00:00:00 2001 From: Leonardo Hernandez Hernandez Date: Sun, 3 Oct 2021 22:08:00 -0500 Subject: [PATCH 3/4] `wlr_xdg_surface.configure_serial` has been moved into `wlr_xdg_surface_state` as seen in swaywm/wlroots@0e34208 --- dwl.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dwl.c b/dwl.c index 5a525d5..f563fd3 100644 --- a/dwl.c +++ b/dwl.c @@ -779,7 +779,7 @@ commitnotify(struct wl_listener *listener, void *data) Client *c = wl_container_of(listener, c, commit); /* mark a pending resize as completed */ - if (c->resize && c->resize <= c->surface.xdg->configure_serial) + if (c->resize && c->resize <= c->surface.xdg->current.configure_serial) c->resize = 0; } From 27f66c87152765942324f85be6b83d0028de295e Mon Sep 17 00:00:00 2001 From: "Devin J. Pohly" Date: Thu, 16 Dec 2021 11:50:11 -0600 Subject: [PATCH 4/4] explicitly create renderer and allocator autocreate was removed --- dwl.c | 15 +++++++++++---- 1 file changed, 11 insertions(+), 4 deletions(-) diff --git a/dwl.c b/dwl.c index f563fd3..4353cfd 100644 --- a/dwl.c +++ b/dwl.c @@ -13,6 +13,7 @@ #include #include #include +#include #include #include #include @@ -307,6 +308,7 @@ static const char broken[] = "broken"; static struct wl_display *dpy; static struct wlr_backend *backend; static struct wlr_renderer *drw; +static struct wlr_allocator *alloc; static struct wlr_compositor *compositor; static struct wlr_xdg_shell *xdg_shell; @@ -822,6 +824,8 @@ createmon(struct wl_listener *listener, void *data) Monitor *m = wlr_output->data = calloc(1, sizeof(*m)); m->wlr_output = wlr_output; + wlr_output_init_render(wlr_output, alloc, drw); + /* Initialize monitor state using configured rules */ for (size_t i = 0; i < LENGTH(m->layers); i++) wl_list_init(&m->layers[i]); @@ -2006,12 +2010,15 @@ setup(void) if (!(backend = wlr_backend_autocreate(dpy))) BARF("couldn't create backend"); - /* If we don't provide a renderer, autocreate makes a GLES2 renderer for us. - * The renderer is responsible for defining the various pixel formats it - * supports for shared memory, this configures that for clients. */ - drw = wlr_backend_get_renderer(backend); + /* Create a renderer with the default implementation */ + if (!(drw = wlr_renderer_autocreate(backend))) + BARF("couldn't create renderer"); wlr_renderer_init_wl_display(drw, dpy); + /* Create a default allocator */ + if (!(alloc = wlr_allocator_autocreate(backend, drw))) + BARF("couldn't create allocator"); + /* This creates some hands-off wlroots interfaces. The compositor is * necessary for clients to allocate surfaces and the data device manager * handles the clipboard. Each of these wlroots interfaces has room for you