From 208af51c0eaf66b61c9890f556f2087520f2d07c Mon Sep 17 00:00:00 2001 From: Jari Vetoniemi Date: Tue, 14 Feb 2017 19:14:08 +0200 Subject: clients: Make -f option show menu immediately --- client/common/common.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'client/common/common.c') diff --git a/client/common/common.c b/client/common/common.c index fab2a58..af9fa31 100644 --- a/client/common/common.c +++ b/client/common/common.c @@ -82,7 +82,7 @@ usage(FILE *out, const char *name) " (...) At end of help indicates the backend support for option.\n\n" " -b, --bottom appears at the bottom of the screen. (x)\n" - " -f, --grab grabs the keyboard before reading stdin. (x)\n" + " -f, --grab show the menu before reading stdin. (wx)\n" " -m, --monitor index of monitor where menu will appear. (x)\n" " --fn defines the font to be used ('name [size]'). (wx)\n" " --tb defines the title background color. (wx)\n" @@ -264,8 +264,12 @@ menu_with_options(struct client *client) for (uint32_t i = 0; i < BM_COLOR_LAST; ++i) bm_menu_set_color(menu, i, client->colors[i]); - if (client->grab) + if (client->grab) { + bm_menu_set_filter(menu, "Loading..."); bm_menu_grab_keyboard(menu, true); + bm_menu_render(menu); + bm_menu_set_filter(menu, NULL); + } return menu; } -- cgit v1.2.3-70-g09d2