aboutsummaryrefslogtreecommitdiff
path: root/menu.c
diff options
context:
space:
mode:
authoradnano <me@adnano.co>2024-05-02 18:45:49 -0400
committeradnano <me@adnano.co>2024-05-02 18:45:49 -0400
commit1f221a73cf290ff509ef6c066ff692bb48f8625e (patch)
treeabdd724cff64843e2dd5de22934d8d2d68ac5e37 /menu.c
parent6284eea24b44d05260f96fe842fa9dd752185942 (diff)
downloadwmenu-1f221a73cf290ff509ef6c066ff692bb48f8625e.tar.gz
Fix destruction of pool buffers
Diffstat (limited to 'menu.c')
-rw-r--r--menu.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/menu.c b/menu.c
index eecf1a0..144a052 100644
--- a/menu.c
+++ b/menu.c
@@ -320,10 +320,12 @@ static void match_items(struct menu *menu) {
}
}
-// Process menu items.
-void menu_process_items(struct menu *menu) {
+// Render menu items.
+void menu_render_items(struct menu *menu) {
+ render_menu(menu);
calc_widths(menu);
match_items(menu);
+ render_menu(menu);
}
static void insert(struct menu *menu, const char *text, ssize_t len) {
@@ -659,7 +661,5 @@ static void free_items(struct menu *menu) {
void menu_destroy(struct menu *menu) {
free_pages(menu);
free_items(menu);
-
- destroy_buffer(&menu->buffers[0]);
- destroy_buffer(&menu->buffers[1]);
+ free(menu);
}