aboutsummaryrefslogtreecommitdiff
path: root/menu.c
diff options
context:
space:
mode:
authoradnano <me@adnano.co>2024-05-02 21:39:54 -0400
committeradnano <me@adnano.co>2024-05-02 21:39:54 -0400
commit41e8599392a543a537f15447e20fd7bc8d8f2297 (patch)
treee14de0c571a1653968cc383d8a9b1c3cd7726c06 /menu.c
parent1f221a73cf290ff509ef6c066ff692bb48f8625e (diff)
downloadwmenu-41e8599392a543a537f15447e20fd7bc8d8f2297.tar.gz
Add wmenu-run executable
Diffstat (limited to 'menu.c')
-rw-r--r--menu.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/menu.c b/menu.c
index 144a052..cbc94b4 100644
--- a/menu.c
+++ b/menu.c
@@ -529,6 +529,8 @@ void menu_keypress(struct menu *menu, enum wl_keyboard_key_state key_state,
puts(menu->input);
fflush(stdout);
menu->exit = true;
+ } else if (menu->callback) {
+ menu->callback(menu);
} else {
char *text = menu->sel ? menu->sel->text : menu->input;
puts(text);