diff options
| author | Jari Vetoniemi <mailroxas@gmail.com> | 2017-02-14 19:14:08 +0200 | 
|---|---|---|
| committer | Jari Vetoniemi <mailroxas@gmail.com> | 2017-02-14 19:20:44 +0200 | 
| commit | 208af51c0eaf66b61c9890f556f2087520f2d07c (patch) | |
| tree | 33bef8d05c96ef652cce90b12a8929922348d946 /client/common/common.c | |
| parent | 91d929ecf477668c2672e305ed725976a3efbc9c (diff) | |
| download | bemenu-208af51c0eaf66b61c9890f556f2087520f2d07c.tar.gz bemenu-208af51c0eaf66b61c9890f556f2087520f2d07c.tar.bz2 bemenu-208af51c0eaf66b61c9890f556f2087520f2d07c.zip | |
clients: Make -f option show menu immediately
Diffstat (limited to 'client/common/common.c')
| -rw-r--r-- | client/common/common.c | 8 | 
1 files changed, 6 insertions, 2 deletions
| 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;  } | 
