diff options
author | Ian Fan <[email protected]> | 2018-10-12 20:18:04 +0100 |
---|---|---|
committer | Ian Fan <[email protected]> | 2018-10-14 13:33:12 +0100 |
commit | 19f0bf38640f4da609782442c901366617aa27fa (patch) | |
tree | 0aa166b77546858f433237ff1533b7ea6b709feb /swaybar/render.c | |
parent | a67fa8a05d010d488b821a7d6e91db5905f7a123 (diff) |
swaybar: add free_hotspots helper function
Diffstat (limited to 'swaybar/render.c')
-rw-r--r-- | swaybar/render.c | 9 |
1 files changed, 1 insertions, 8 deletions
diff --git a/swaybar/render.c b/swaybar/render.c index dc31a5ea..2a06a79b 100644 --- a/swaybar/render.c +++ b/swaybar/render.c @@ -491,14 +491,7 @@ static const struct wl_callback_listener output_frame_listener = { void render_frame(struct swaybar_output *output) { assert(output->surface != NULL); - struct swaybar_hotspot *hotspot, *tmp; - wl_list_for_each_safe(hotspot, tmp, &output->hotspots, link) { - if (hotspot->destroy) { - hotspot->destroy(hotspot->data); - } - wl_list_remove(&hotspot->link); - free(hotspot); - } + free_hotspots(&output->hotspots); cairo_surface_t *recorder = cairo_recording_surface_create( CAIRO_CONTENT_COLOR_ALPHA, NULL); |