diff options
author | Jari Vetoniemi <mailroxas@gmail.com> | 2015-01-16 01:59:09 +0200 |
---|---|---|
committer | Jari Vetoniemi <mailroxas@gmail.com> | 2015-01-16 01:59:09 +0200 |
commit | ada6edc175eb89d318e55204368e2ba5dad07b1b (patch) | |
tree | 035ff1c1db386e48135705b5c663060248b3fa66 /client | |
parent | 0cd1c991d20c5c10190e520071691e849541f619 (diff) | |
download | bemenu-ada6edc175eb89d318e55204368e2ba5dad07b1b.tar.gz bemenu-ada6edc175eb89d318e55204368e2ba5dad07b1b.tar.bz2 bemenu-ada6edc175eb89d318e55204368e2ba5dad07b1b.zip |
Add X11 renderer.
Diffstat (limited to 'client')
-rw-r--r-- | client/common/common.c | 39 |
1 files changed, 23 insertions, 16 deletions
diff --git a/client/common/common.c b/client/common/common.c index d8125cd..74ad6d6 100644 --- a/client/common/common.c +++ b/client/common/common.c @@ -73,24 +73,24 @@ usage(FILE *out, const char *name) " --prioritory options: terminal, gui\n\n" "Backend specific options\n" - " c = ncurses, w == wayland\n" + " c = ncurses, w == wayland, x == x11\n" " (...) At end of help indicates the backend support for option.\n\n" - " -b, --bottom appears at the bottom of the screen. ()\n" - " -f, --grab grabs the keyboard before reading stdin. ()\n" - " -m, --monitor index of monitor where menu will appear. ()\n" - " --fn defines the font to be used ('name [size]'). (w)\n" - " --bg defines the background color. (w)\n" - " --tb defines the title background color. (w)\n" - " --tf defines the title foreground color. (w)\n" - " --fb defines the filter background color. (w)\n" - " --ff defines the filter foreground color. (w)\n" - " --nb defines the normal background color. (w)\n" - " --nf defines the normal foreground color. (w)\n" - " --hb defines the highlighted background color. (w)\n" - " --hf defines the highlighted foreground color. (w)\n" - " --sb defines the selected background color. (w)\n" - " --sf defines the selected foreground color. (w)\n", out); + " -b, --bottom appears at the bottom of the screen. (x)\n" + " -f, --grab grabs the keyboard before reading stdin. (x)\n" + " -m, --monitor index of monitor where menu will appear. (x)\n" + " --fn defines the font to be used ('name [size]'). (wx)\n" + " --bg defines the background color. (wx)\n" + " --tb defines the title background color. (wx)\n" + " --tf defines the title foreground color. (wx)\n" + " --fb defines the filter background color. (wx)\n" + " --ff defines the filter foreground color. (wx)\n" + " --nb defines the normal background color. (wx)\n" + " --nf defines the normal foreground color. (wx)\n" + " --hb defines the highlighted background color. (wx)\n" + " --hf defines the highlighted foreground color. (wx)\n" + " --sb defines the selected background color. (wx)\n" + " --sf defines the selected foreground color. (wx)\n", out); exit((out == stderr ? EXIT_FAILURE : EXIT_SUCCESS)); } @@ -257,16 +257,23 @@ menu_with_options(struct client *client) bm_menu_set_filter_mode(menu, client->filter_mode); bm_menu_set_lines(menu, client->lines); bm_menu_set_wrap(menu, client->wrap); + bm_menu_set_bottom(menu, client->bottom); + bm_menu_set_monitor(menu, client->monitor); for (uint32_t i = 0; i < BM_COLOR_LAST; ++i) bm_menu_set_color(menu, i, client->colors[i]); + if (client->grab) + bm_menu_grab_keyboard(menu, true); + return menu; } enum bm_run_result run_menu(struct bm_menu *menu) { + bm_menu_grab_keyboard(menu, true); + uint32_t unicode; enum bm_key key; enum bm_run_result status = BM_RUN_RESULT_RUNNING; |