diff options
Diffstat (limited to 'dbar.c')
| -rw-r--r-- | dbar.c | 9 |
1 files changed, 9 insertions, 0 deletions
@@ -205,6 +205,7 @@ registry_global(void *data, struct wl_registry *wl_registry, uint32_t name, cons } else if (strcmp(interface, wl_output_interface.name) == 0) { bar = add_bar(); bar->wl_output = wl_registry_bind(wl_registry, name, &wl_output_interface, 1); + bar->registry_name = name; if (ready) { register_bar(bar); @@ -218,6 +219,7 @@ remove_global(void *data, struct wl_registry *wl_registry, uint32_t name) { Bar *bar = bars; Bar *prev = 0; + for (; bar; bar = bar->next) { if (bar->registry_name == name) { if (prev) { @@ -407,12 +409,19 @@ add_bar() void remove_bar(Bar *bar) { + fprintf(stderr, "remove bar 1\n"); wl_surface_destroy(bar->wl_surface); + fprintf(stderr, "remove bar 2\n"); zwlr_layer_surface_v1_destroy(bar->zwlr_surface); + fprintf(stderr, "remove bar 3\n"); wl_output_destroy(bar->wl_output); + fprintf(stderr, "remove bar 4\n"); zdwl_output_v1_destroy(bar->dwl_output); + fprintf(stderr, "remove bar 5\n"); free_drw(bar->canvas); + fprintf(stderr, "remove bar 6\n"); free(bar); + fprintf(stderr, "remove bar 7\n"); } |