aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNathan Reiner <nathan@nathanreiner.xyz>2023-04-24 21:53:28 +0200
committerNathan Reiner <nathan@nathanreiner.xyz>2023-04-24 21:53:28 +0200
commit6824e245ff8424e2ec56f02c89784b45495811b0 (patch)
tree6c1c5988661512999f5abc527e287212ed79a0b4
parentf14acf7306b022c1d0dd98f5fd654dbdc38e64e5 (diff)
free canvas on reconfigure
-rw-r--r--ffbg.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/ffbg.c b/ffbg.c
index 4fd5e25..10ecd03 100644
--- a/ffbg.c
+++ b/ffbg.c
@@ -200,6 +200,10 @@ layer_surface_configure(void *data, struct zwlr_layer_surface_v1 *surface, uint3
zwlr_layer_surface_v1_set_exclusive_zone(surface, -1);
zwlr_layer_surface_v1_ack_configure(surface, serial);
+ if (bg->canvas != 0) {
+ free_drw(bg->canvas);
+ }
+
bg->canvas = create_drw(bg_state.wl_shm, bg->width, bg->height);
update_bg(bg);