From 0824977739e7f1c91a87fbf6c1627d09a01a2090 Mon Sep 17 00:00:00 2001 From: Alexander Courtis Date: Wed, 29 Jul 2020 15:54:14 +1000 Subject: [PATCH] do not render frames when any surface has uncommitted changes --- dwl.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/dwl.c b/dwl.c index 6977bcf..4c6c7d9 100644 --- a/dwl.c +++ b/dwl.c @@ -638,10 +638,11 @@ destroynotify(struct wl_listener *listener, void *data) { /* Called when the surface is destroyed and should never be shown again. */ Client *c = wl_container_of(listener, c, destroy); - wl_list_remove(&c->commit.link); wl_list_remove(&c->map.link); wl_list_remove(&c->unmap.link); wl_list_remove(&c->destroy.link); + if (c->type == XDGShell) + wl_list_remove(&c->commit.link); free(c); } @@ -1247,7 +1248,7 @@ rendermon(struct wl_listener *listener, void *data) { if (c->dirty) { - wlr_surface_send_frame_done(c->xdg_surface->surface, &now); + wlr_surface_send_frame_done(WLR_SURFACE(c), &now); render = 0; } }