Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix --filter #322

Merged
merged 3 commits into from
Dec 16, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 5 additions & 5 deletions client/common/common.c
Original file line number Diff line number Diff line change
Expand Up @@ -322,7 +322,7 @@ do_getopt(struct client *client, int *argc, char **argv[])
for (optind = 0;;) {
int32_t opt;

if ((opt = getopt_long(*argc, *argv, "hviwxcl:I:p:P:I:bfm:H:M:W:B:nsCTK", opts, NULL)) < 0)
if ((opt = getopt_long(*argc, *argv, "hviwxcl:I:p:P:I:bfF:m:H:M:W:B:nsCTK", opts, NULL)) < 0)
break;

switch (opt) {
Expand Down Expand Up @@ -569,6 +569,10 @@ menu_with_options(struct client *client)
enum bm_run_result
run_menu(const struct client *client, struct bm_menu *menu, void (*item_cb)(const struct client *client, struct bm_item *item))
{
bm_menu_set_highlighted_index(menu, client->selected);
bm_menu_grab_keyboard(menu, true);
bm_menu_set_filter(menu, client->initial_filter);

{
uint32_t total_item_count;
struct bm_item **items = bm_menu_get_items(menu, &total_item_count);
Expand All @@ -584,10 +588,6 @@ run_menu(const struct client *client, struct bm_menu *menu, void (*item_cb)(cons

}

bm_menu_set_highlighted_index(menu, client->selected);
bm_menu_grab_keyboard(menu, true);
bm_menu_set_filter(menu, client->initial_filter);

uint32_t unicode;
enum bm_key key = BM_KEY_NONE;
struct bm_pointer pointer;
Expand Down
3 changes: 2 additions & 1 deletion lib/renderers/wayland/wayland.c
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,8 @@ schedule_windows_render_if_dirty(struct bm_menu *menu, struct wayland *wayland)
// be(re)created. We need to do the render ASAP (not schedule it) because otherwise,
// since we lack a window, we may not receive further events and will get deadlocked
render_windows_if_pending(menu, wayland);
} else if (menu->dirty) {
}
if (menu->dirty) {
bm_wl_window_schedule_render(window);
}
}
Expand Down