diff options
author | Jari Vetoniemi <mailroxas@gmail.com> | 2015-01-16 01:48:47 +0200 |
---|---|---|
committer | Jari Vetoniemi <mailroxas@gmail.com> | 2015-01-16 01:48:47 +0200 |
commit | 0cd1c991d20c5c10190e520071691e849541f619 (patch) | |
tree | 5afb4a8e1e99fce2e936b05e593d4406a1cc139b /lib/renderers/wayland/window.c | |
parent | 2bf8bbfcde0f2cb4d2ddc7a633d1f03933368c0a (diff) | |
download | bemenu-0cd1c991d20c5c10190e520071691e849541f619.tar.gz bemenu-0cd1c991d20c5c10190e520071691e849541f619.tar.bz2 bemenu-0cd1c991d20c5c10190e520071691e849541f619.zip |
Take monitor height into account again.
Diffstat (limited to 'lib/renderers/wayland/window.c')
-rw-r--r-- | lib/renderers/wayland/window.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/lib/renderers/wayland/window.c b/lib/renderers/wayland/window.c index a9c9edc..bfff232 100644 --- a/lib/renderers/wayland/window.c +++ b/lib/renderers/wayland/window.c @@ -149,8 +149,10 @@ create_buffer(struct wl_shm *shm, struct buffer *buffer, int32_t width, int32_t if (!(surf = cairo_image_surface_create_for_data(data, CAIRO_FORMAT_ARGB32, width, height, stride))) goto fail; - if (!bm_cairo_create_for_surface(&buffer->cairo, surf)) + if (!bm_cairo_create_for_surface(&buffer->cairo, surf)) { + cairo_surface_destroy(surf); goto fail; + } buffer->width = width; buffer->height = height; @@ -266,7 +268,7 @@ bm_wl_window_render(struct window *window, const struct bm_menu *menu) break; struct cairo_paint_result result; - window->notify.render(&buffer->cairo, buffer->width, buffer->height, menu, &result); + window->notify.render(&buffer->cairo, buffer->width, fmin(buffer->height, window->max_height), window->max_height, menu, &result); window->displayed = result.displayed; if (window->height == result.height) |