diff options
Diffstat (limited to 'lib/renderers/wayland/wayland.c')
-rw-r--r-- | lib/renderers/wayland/wayland.c | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/lib/renderers/wayland/wayland.c b/lib/renderers/wayland/wayland.c index 2cdedec..3852a6d 100644 --- a/lib/renderers/wayland/wayland.c +++ b/lib/renderers/wayland/wayland.c @@ -38,10 +38,13 @@ render(const struct bm_menu *menu) } } - uint32_t count; - bm_menu_get_filtered_items(menu, &count); - uint32_t lines = (count < menu->lines ? count : menu->lines) + 1; - bm_wl_window_render(&wayland->window, menu, lines); + if (wayland->input.code != wayland->input.last_code) { + uint32_t count; + bm_menu_get_filtered_items(menu, &count); + uint32_t lines = (count < menu->lines ? count : menu->lines) + 1; + bm_wl_window_render(&wayland->window, menu, lines); + wayland->input.last_code = wayland->input.code; + } } static enum bm_key |