diff options
author | Jari Vetoniemi <mailRoxas@gmail.com> | 2018-04-29 19:51:57 +0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-04-29 19:51:57 +0300 |
commit | 5ecb57085785c8e3fac68d8a2f2b6cf2e44c1092 (patch) | |
tree | 28685517342ee943414de4047900e2c8f83171ce /lib/renderers/wayland/wayland.c | |
parent | f7bb9f953df41d61beb1bce750ca10df1993ec99 (diff) | |
parent | 67c3c04acbc8e00a9fcbcba63940eea66dd3d01f (diff) | |
download | bemenu-5ecb57085785c8e3fac68d8a2f2b6cf2e44c1092.tar.gz bemenu-5ecb57085785c8e3fac68d8a2f2b6cf2e44c1092.tar.bz2 bemenu-5ecb57085785c8e3fac68d8a2f2b6cf2e44c1092.zip |
Merge pull request #33 from martinetd/wayland
More wayland fixes
Diffstat (limited to 'lib/renderers/wayland/wayland.c')
-rw-r--r-- | lib/renderers/wayland/wayland.c | 15 |
1 files changed, 14 insertions, 1 deletions
diff --git a/lib/renderers/wayland/wayland.c b/lib/renderers/wayland/wayland.c index 69ca230..dd97009 100644 --- a/lib/renderers/wayland/wayland.c +++ b/lib/renderers/wayland/wayland.c @@ -40,7 +40,7 @@ render(const struct bm_menu *menu) if (wayland->input.code != wayland->input.last_code) { struct window *window; wl_list_for_each(window, &wayland->windows, link) { - bm_wl_window_render(window, menu); + bm_wl_window_render(window, wayland->display, menu); } wayland->input.last_code = wayland->input.code; } @@ -190,6 +190,18 @@ set_bottom(const struct bm_menu *menu, bool bottom) } static void +grab_keyboard(const struct bm_menu *menu, bool grab) +{ + struct wayland *wayland = menu->renderer->internal; + assert(wayland); + + struct window *window; + wl_list_for_each(window, &wayland->windows, link) { + bm_wl_window_grab_keyboard(window, wayland->display, grab); + } +} + +static void destructor(struct bm_menu *menu) { struct wayland *wayland = menu->renderer->internal; @@ -282,6 +294,7 @@ register_renderer(struct render_api *api) api->poll_key = poll_key; api->render = render; api->set_bottom = set_bottom; + api->grab_keyboard = grab_keyboard; api->priorty = BM_PRIO_GUI; api->version = BM_PLUGIN_VERSION; return "wayland"; |