summaryrefslogtreecommitdiff
path: root/lib/renderers/wayland/wayland.c
diff options
context:
space:
mode:
authorDominique Martinet <asmadeus@codewreck.org>2018-04-16 17:53:11 +0900
committerDominique Martinet <asmadeus@codewreck.org>2018-04-16 17:53:11 +0900
commit91bf9b4d14bcf135809a7fd381ebaf7986042f47 (patch)
treedfc7b33465089fc488a6fc52ace7bf8b5cb8797d /lib/renderers/wayland/wayland.c
parentb735a4842c3eee8f1a7dbeda2d49c91faface16f (diff)
downloadbemenu-91bf9b4d14bcf135809a7fd381ebaf7986042f47.tar.gz
bemenu-91bf9b4d14bcf135809a7fd381ebaf7986042f47.tar.bz2
bemenu-91bf9b4d14bcf135809a7fd381ebaf7986042f47.zip
wayland renderer: implement bottom
Diffstat (limited to 'lib/renderers/wayland/wayland.c')
-rw-r--r--lib/renderers/wayland/wayland.c14
1 files changed, 14 insertions, 0 deletions
diff --git a/lib/renderers/wayland/wayland.c b/lib/renderers/wayland/wayland.c
index ab32a3e..cebba45 100644
--- a/lib/renderers/wayland/wayland.c
+++ b/lib/renderers/wayland/wayland.c
@@ -178,6 +178,18 @@ get_displayed_count(const struct bm_menu *menu)
}
static void
+set_bottom(const struct bm_menu *menu, bool bottom)
+{
+ struct wayland *wayland = menu->renderer->internal;
+ assert(wayland);
+
+ struct window *window;
+ wl_list_for_each(window, &wayland->windows, link) {
+ bm_wl_window_set_bottom(window, wayland->display, bottom);
+ }
+}
+
+static void
destructor(struct bm_menu *menu)
{
struct wayland *wayland = menu->renderer->internal;
@@ -234,6 +246,7 @@ constructor(struct bm_menu *menu)
if (!(surface = wl_compositor_create_surface(wayland->compositor)))
goto fail;
struct window *window = calloc(1, sizeof(struct window));
+ window->bottom = menu->bottom;
if (!bm_wl_window_create(window, wayland->display, wayland->shm, output->output, wayland->layer_shell, surface))
goto fail;
window->notify.render = bm_cairo_paint;
@@ -268,6 +281,7 @@ register_renderer(struct render_api *api)
api->get_displayed_count = get_displayed_count;
api->poll_key = poll_key;
api->render = render;
+ api->set_bottom = set_bottom;
api->priorty = BM_PRIO_GUI;
api->version = BM_PLUGIN_VERSION;
return "wayland";