mirror of
https://github.com/Cloudef/bemenu
synced 2025-02-15 14:16:50 +00:00
fix scaling caused issue on window redimension on wayland
This caused issue when using the -b (bottom) and -l (line) arguments on scaled outputs. When using a scaled output, the set_size use a wrong value as height. We generated a scalled buffer so we used a scale x too high size. We just have to divide the scaling to use a good size.
This commit is contained in:
parent
eb41286593
commit
a84eeb770e
@ -236,10 +236,10 @@ bm_wl_window_render(struct window *window, struct wl_display *display, const str
|
||||
window->notify.render(&buffer->cairo, buffer->width, window->max_height, menu, &result);
|
||||
window->displayed = result.displayed;
|
||||
|
||||
if (window->height == result.height)
|
||||
if (window->height == result.height / window->scale)
|
||||
break;
|
||||
|
||||
window->height = result.height;
|
||||
window->height = result.height / window->scale;
|
||||
zwlr_layer_surface_v1_set_size(window->layer_surface, 0, window->height);
|
||||
wl_surface_commit(window->surface);
|
||||
wl_display_roundtrip(display);
|
||||
|
Loading…
Reference in New Issue
Block a user